JingsongLi commented on code in PR #9437:
URL: https://github.com/apache/paimon/pull/9437#discussion_r3912284758
##########
paimon-core/src/main/java/org/apache/paimon/utils/SnapshotManager.java:
##########
@@ -382,8 +382,8 @@ public long repairEarliestSnapshot(long snapshotId) {
earliest = mid + 1; // Search in the right half
finalSnapshot = snapshot;
} else {
- finalSnapshot = snapshot; // Found the exact match
- break;
+ finalSnapshot = snapshot;
+ earliest = mid + 1;
Review Comment:
[P2] Retry if rollback moves the upper bound after the first equal
probe\n\nResolving only closes the race before the binary search starts. With
, first records snapshot 1. If retains snapshot 1 at that point, it commits
and deletes snapshots 4 through 2. This branch advances to 2, so the next
throws even though snapshot 1 is still the correct result. I reproduced this
deterministically by triggering rollback immediately after the first equal
probe.\n\nPlease read probes through and, when a post-match probe disappears,
refresh the live upper bound and restart with a bounded retry. A regression
test should trigger rollback after the first equal midpoint has been read.
--
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]