Skip to content

[core] Fix rollback_to_watermark with repeated snapshot watermarks - #11149

Open
chenjian2664 wants to merge 1 commit into
apache:masterfrom
chenjian2664:chenjian2664/bytequay/fix-earlier-or-equal-watermark-repeated-watermarks
Open

chenjian2664 wants to merge 1 commit into
apache:masterfrom
chenjian2664:chenjian2664/bytequay/fix-earlier-or-equal-watermark-repeated-watermarks

Conversation

@chenjian2664

Copy link
Copy Markdown
Contributor

Purpose

When several snapshots share a watermark, rollback_to_watermark could roll back to a snapshot in the middle of that run and drop later snapshots that also carry the requested watermark. Repeated watermarks are common because the commit watermark takes the maximum, so compaction snapshots and commits without their own watermark inherit the previous one.

earlierOrEqualWatermark now keeps searching to the right on an exact match and returns the last such snapshot, mirroring the lower-bound handling of laterOrEqualWatermark from #10420.

Tests

@chenjian2664
chenjian2664 marked this pull request as ready for review November 15, 2026 00:52
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