Skip to content

Make agility context account for clear() size in quota - #4574

Open
ohadzeliger wants to merge 1 commit into
FoundationDB:mainfrom
ohadzeliger:agile-context-clear-size
Open

Make agility context account for clear() size in quota#4574
ohadzeliger wants to merge 1 commit into
FoundationDB:mainfrom
ohadzeliger:agile-context-clear-size

Conversation

@ohadzeliger

@ohadzeliger ohadzeliger commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

This PR fixes an issue with the agility context that ignored size quota accumulation for clear and clear(range).
The actual consequence of the issue was that large merge jobs done by Lucene could not be complete: The last step of the merge is a clear() of all the old files, and in the case where there were a few thousands of them the transaction would fail, leaving them behind. Subsequent merge jobs would keep failing trying to remove them as well.
The reproduction included creating large merge operation with thousands of segments, but that kind of reproduction takes hours and so is not feasible for adding to the test suites. A much faster test that shows that many clears would fail (and pass with the fix) is used instead.
Note that the actual failure reproduced is that of Transaction too large (Byte bound), not a Transaction too old. The assumption here is that depending on network latencies and other external factors these errors can be interchanged for the purpose of reproduction.

Resolves #4575

@ohadzeliger ohadzeliger self-assigned this Sep 7, 2026
@ohadzeliger ohadzeliger added the bug fix Change that fixes a bug label Sep 7, 2026
@ohadzeliger
ohadzeliger marked this pull request as ready for review September 8, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Change that fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lucene merge operation fails with Transaction too old

1 participant