Skip to content

Replication send loop: mid-log break classification is per range, so a second log's torn tail waits out the 30-minute quarantine #1067

Open

Description

@kriszyp

Follow-up from review of Recover a replication leg wedged at connected:true with no receive progress (harper-pro#815).

Problem

Core reports corruptFrameStop.midLogBreak as a property of the merged send range object, not of each transaction log. In the send loop (replication/replicationConnection.ts, repairSendLogBreak), once any log in the merged range hits a mid-log break, a later, independent and recoverable torn tail in a different log of the same range is also classified mid-log. It then waits out the 30-minute quarantine recheck instead of the 30-second repair floor.

Consequence: a bounded delivery delay (at most 30 minutes) for the second log. No data loss. Rare: it needs two independent corruptions in one merged range.

Suggested direction

Have core report the break type per log (for example, a midLogBreak flag on each entry of corruptFrameStop.breaks), and have the send loop pace repairs per log. The send loop change is small once the signal exists.

Review-Deferral: 88e3556de478af1d severity=minor category=reliability

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    P3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions