Skip to content

PHOENIX-7938 Round-align the sync-replication replay consistency point#2570

Open
Himanshu-g81 wants to merge 5 commits into
apache:PHOENIX-7562-feature-newfrom
Himanshu-g81:PHOENIX-7938
Open

PHOENIX-7938 Round-align the sync-replication replay consistency point#2570
Himanshu-g81 wants to merge 5 commits into
apache:PHOENIX-7562-feature-newfrom
Himanshu-g81:PHOENIX-7938

Conversation

@Himanshu-g81

@Himanshu-g81 Himanshu-g81 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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.

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.

1 participant