PHOENIX-7846 Bound rotation replay cost for large commit batches#2469
Open
tkhurana wants to merge 1 commit into
Open
PHOENIX-7846 Bound rotation replay cost for large commit batches#2469tkhurana wants to merge 1 commit into
tkhurana wants to merge 1 commit into
Conversation
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.
Summary
append(), the writer implicitly syncs (flushes + closes the block). This change propagates that implicit-sync signal back toReplicationLog.append()so it can clearcurrentBatch, acknowledging that all records up to that point are durable.sync()) even though most of those records were already durably written via block-full syncs. For large commit batches this means replay cost grows with batch size instead of being bounded by the block size.LogFile.Writer.append()return type changes fromvoidtoboolean—truewhen an implicit block-full sync occurred,falsewhen the record was buffered only.Test plan
testBlockFullSyncOnAppendReducesReplayOnRotationinReplicationLogGroupTestverifies that the number of replayed appends after rotation is strictly less than the total number of records written, confirming block-full clearing bounds replay.ReplicationLogGroupTestandReplicationLogITsuites pass.mvn spotless:applypasses.