-
Notifications
You must be signed in to change notification settings - Fork 673
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
scorch persister does not introduce new root when only internal values changed #763
Comments
The persister DID persist the snapshot containing the internal values. What it is NOT doing is introducing a new root. And the reason is that it does not have to. The only reason to introduce a new root is if we want to swap in some newly persisted zap segments, but we don't have any of those in this case. The new internal values are already available to readers through the work done by the introducer, and the persister did it's job to persist them in the root bolt with this snapshot. So, for the case of internal only changes, there is nothing more to be done. |
Makes sense -- and I sense the same theory applies to batches that are doc deletions only. |
Yes, same for deletions only. Can we improve the comment to not confuse ourselves later? Or should we just close? |
Yep, good idea -- will put up a comment improvement |
Some previous conversation in #749
The persister will persist the root as it always does, but since no new files were persisted to disk (only changes in the root bolt), the if block check will fail and a new root is not introduced.
Upon further reflection this might be OK. The only reason for us to introduce a new root is to swap in the persisted zap segments, but that doesn't apply in this case. The new root with the new internal values was already made available to readers. So I'm starting to think this is OK.
The text was updated successfully, but these errors were encountered: