Skip to content

fix(sync): handle truncate/extend operations correctly in syncing#403

Merged
SF-Zhou merged 1 commit into
mainfrom
fix-syncing-truncate
Mar 27, 2026
Merged

fix(sync): handle truncate/extend operations correctly in syncing#403
SF-Zhou merged 1 commit into
mainfrom
fix-syncing-truncate

Conversation

@SF-Zhou

@SF-Zhou SF-Zhou commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens syncing/forwarding behavior to correctly handle truncate/extend operations when forwarding updates to a successor target in SYNCING state.

Changes:

  • Reject truncate/extend updates that are marked as options.isSyncing on the storage server side.
  • Adjust ReliableForwarding’s readForSyncing condition to ensure truncate/extend operations trigger full-chunk read/forwarding during syncing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/storage/service/StorageOperator.cc Adds validation to reject truncate/extend when options.isSyncing is set.
src/storage/service/ReliableForwarding.cc Updates syncing-forward read decision logic to include truncate/extend (including the length == chunkSize extend case).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/storage/service/StorageOperator.cc
Comment thread src/storage/service/ReliableForwarding.cc
@SF-Zhou SF-Zhou merged commit e2cef82 into main Mar 27, 2026
5 checks passed
@SF-Zhou SF-Zhou deleted the fix-syncing-truncate branch March 27, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants