PHOENIX-7938 Round-align the sync-replication replay consistency point#2570
Open
Himanshu-g81 wants to merge 5 commits into
Open
PHOENIX-7938 Round-align the sync-replication replay consistency point#2570Himanshu-g81 wants to merge 5 commits into
Himanshu-g81 wants to merge 5 commits into
Conversation
added 5 commits
July 8, 2026 15:43
…f magic 60000L in UT
…omments with what is verified
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.
JIRA: https://issues.apache.org/jira/browse/PHOENIX-7938 (sub-task of PHOENIX-7562)
Problem: In SYNC state, getConsistencyPoint() used the raw minimum timestamp of the IN-PROGRESS files. Since files within a round move to IN-PROGRESS in random order, that minimum can belong to a later file while an older sibling still waits in IN — advancing the consistency point past unreplayed data. Because the compaction guard treats it as an exclusive bound (consistencyPoint - 1), it could drop delete markers for unreplayed data (data-resurrection risk).
Fix: align the minimum IN-PROGRESS timestamp down to its round start. Every file in round N has ts >= roundStart(N) and earlier rounds are fully replayed first, so roundStart(N) is a safe, conservative bound requiring no IN-directory listing. Only the SYNC branch changes; the guard formula and shared helpers are untouched, and the configurable round duration is honored.
Tests: new unit tests (out-of-order, boundary, multi-round) and a mini-cluster IT. Pre-fix code returns the raw minimum and fails these assertions.