-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Harden periodically check to avoid endless flush loop #29125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7cbd56a
Harden periodically check to avoid endless flush loop
dnhatn c2d8d4d
share code between sizeOfGensAboveSeqNoInBytes and getMinGenerationFo…
dnhatn fc1a9fc
comment
dnhatn 024fa2a
Merge branch 'master' into fix-infinite-flush
dnhatn 330527c
Remove uncommitted ops and operations
dnhatn 2a74071
add stress test
dnhatn 6ee9373
Comment
dnhatn 76ddf6b
Merge branch 'master' into fix-infinite-flush
dnhatn 7587ee6
Do not ask translog for the last commit - engine has it
dnhatn d02770e
simplify test
dnhatn 2e7897f
Inline the last commit
dnhatn 50c352d
single loop
dnhatn 7e43393
Merge branch 'master' into fix-infinite-flush
dnhatn 031b112
improve the engine test
dnhatn 05bffec
Remove #uncommittedGeneration from translog
dnhatn 4b8708f
add boaz comment
dnhatn ef8a2d3
Let’s use stats
dnhatn 00890d5
Remove unused imports
dnhatn be37774
restore scale randome ops
dnhatn a24b434
more comment
dnhatn 4240241
fix comment after talked to Boaz
dnhatn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment that if
translogGenerationOfLastCommit== translogGenerationOfNewCommitandlocalCheckpointTracker.getCheckpoint() == localCheckpointTracker.getMaxSeqNo()we know that the last generation must contain operation as it's size is above the threshold and the threshold is guaranteed to be higher than an empty translog gen by the setting validation. Therefore, flushing will improve things. This is tricky to figure out (which is why I didn't like this approach originally).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS - as far as I can tell this can only happen if the translog generation file size limit is close or above to the flush threshold and we can end up here if one indexes faster then it takes to roll generations. If that's true, can you add this to the comment? This just too subtle but I can't see how to avoid it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the comment.