-
Notifications
You must be signed in to change notification settings - Fork 637
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
Scavenge: Handle events that have been deleted from (now empty) chunks but not from the index #3813
Conversation
caab6f9
to
9e1b740
Compare
please hold on the review - i'm improving the test cases |
6ca83d0
to
31a1fef
Compare
src/EventStore.Core/TransactionLog/Scavenging/Data/DiscardDecision.cs
Outdated
Show resolved
Hide resolved
great, nice work 👍 squash the changes and i'll approve |
for posterity, shaan and i identified that the scenario where the
the net effect is that in this scenario, if the allDiscardedSoFar check was not present, D would be removed, perhaps to the surprise of the user. note that a stream in this state is hard to read. in order to read D the read must not also try to include E if it wasn't for this corner case, then the |
…from the index Previously this would result in the scavenge stopping with an error like "Could not get TimeStamp range for chunk <chunk number>" But this is a possible state if the old scavenge had scavenged the chunks but not the index. This fix correctly handles this scenario so that the scavenge process can continue
3ea99e7
to
f257bcd
Compare
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.
👍
thanks for the thorough review! |
thanks for the careful code! |
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.
@hayley-jean 👉 Created pull request targeting release/oss-v22.10: #3821
Fixed: Handle events that have been deleted from (now empty) chunks but not from the index
Previously this would result in the scavenge stopping with an error like "Could not get TimeStamp range for chunk "
But this is a possible state if the old scavenger had scavenged the chunks but not the index. This fix correctly handles this scenario so that the scavenge process can continue