Mirror client fixes - #1086
Open
AlCutter wants to merge 1 commit into
Open
Conversation
roger2hk
reviewed
Jul 31, 2026
|
|
||
| // Push the checkpoint with the old size (0 if not provided). | ||
| for c.oldSize < targetSize { | ||
| // Keep trying for as long we we get conflict errors or the context is not cancelled. |
Contributor
There was a problem hiding this comment.
Suggested change
| // Keep trying for as long we we get conflict errors or the context is not cancelled. | |
| // Keep trying for as long as we get conflict errors or the context is not cancelled. |
| // Ensure we send the checkpoint at least once, this serves two purposes: | ||
| // 1. We refresh the witness' timestamped view of the log, committing to the fact that the log hasn't grown. | ||
| // 2. If this is the first time we're pushing the checkpoint (i.e. c.oldSize == 0), we're ensuring that we'll send a zero-sized checkpoint. | ||
| for { |
Contributor
There was a problem hiding this comment.
There is an infinite loop in the following scenario:
- If the mirror's pending size is greater than
targetSize(e.g.,conflict.PendingSize=10whiletargetSize=5),c.oldSizebecomes10. - In the next loop iteration,
pushCheckpointis called withc.oldSize=10andtargetSize=5. - The mirror rejects requests where
uploadStart > uploadEndand returns anotherErrConflicterror. - This
Syncfunction continuously retries the failing request in an infinite loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes a couple of minor fixes to the MTC mirror client:
Towards #945