MB-71041: avoid updating root.bolt with in-memory segment's data#2296
Merged
Conversation
938d857 to
6151e31
Compare
6151e31 to
0651fd1
Compare
0651fd1 to
01d1814
Compare
abhinavdangeti
requested changes
Mar 30, 2026
Member
abhinavdangeti
left a comment
There was a problem hiding this comment.
Some nit-picks, also I believe you'll push up another patch here with a unit test :)
Member
abhinavdangeti
left a comment
There was a problem hiding this comment.
Hope the unit test fails without the fix? :)
82b119a to
b7025c1
Compare
b7025c1 to
9174921
Compare
9174921 to
6f36255
Compare
abhinavdangeti
previously approved these changes
Mar 31, 2026
Member
abhinavdangeti
left a comment
There was a problem hiding this comment.
Thank you @Thejas-bhat 👍🏼
root.bolt with in-memory segment's data
abhinavdangeti
approved these changes
Mar 31, 2026
Thejas-bhat
added a commit
that referenced
this pull request
Mar 31, 2026
…ta (#2296) In-memory segments are volatile and in scenarios where index is closed and opened back, we must ensure that only data corresponding to the on-disk, persisted segments are loaded and retained. This PR fixes a bug where the `indexSnapshot.internal` would potentially end up having data corresponding to the in-memory segments which technically means we've corrupted the index with non-existent data. This also fixes the bug where we would also record the segment's deleted bitmap, stats and updatedFields info in the bolt metadata file, which is incorrect.
ns-codereview
pushed a commit
to couchbase/cbft
that referenced
this pull request
Apr 1, 2026
This reverts commit c24d0f0 and comes along with the fix blevesearch/bleve#2296 Change-Id: Ia55e0296e83603797a441da32b818407d39df4e4 Reviewed-on: https://review.couchbase.org/c/cbft/+/242697 Reviewed-by: Abhi Dangeti <abhinav@couchbase.com> Tested-by: <thejas.orkombu@couchbase.com> Well-Formed: Build Bot <build@couchbase.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In-memory segments are volatile and in scenarios where index is closed and opened back, we must ensure that only data corresponding to the on-disk, persisted segments are loaded and retained.
This PR fixes a bug where the
indexSnapshot.internalwould potentially end up having data corresponding to the in-memory segments which technically means we've corrupted the index with non-existent data. This also fixes the bug where we would also record the segment's deleted bitmap, stats and updatedFields info in the bolt metadata file, which is incorrect.