tkhurana opened a new pull request, #2469:
URL: https://github.com/apache/phoenix/pull/2469

   ## Summary
   - When a replication log block fills up during `append()`, the writer 
implicitly syncs (flushes + closes the block). This change propagates that 
implicit-sync signal back to `ReplicationLog.append()` so it can clear 
`currentBatch`, acknowledging that all records up to that point are durable.
   - Without this fix, log rotation replays the **entire** inter-sync window 
(all records since the last explicit `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.
   - With this fix, rotation replay cost is bounded by the block size 
regardless of how large the commit batch is.
   - The `LogFile.Writer.append()` return type changes from `void` to `boolean` 
— `true` when an implicit block-full sync occurred, `false` when the record was 
buffered only.
   
   ## Test plan
   - [x] New unit test `testBlockFullSyncOnAppendReducesReplayOnRotation` in 
`ReplicationLogGroupTest` verifies that the number of replayed appends after 
rotation is strictly less than the total number of records written, confirming 
block-full clearing bounds replay.
   - [ ] Existing `ReplicationLogGroupTest` and `ReplicationLogIT` suites pass.
   - [ ] `mvn spotless:apply` passes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to