Proposed format change: Add invalidated_fragments field for IndexMetadata
#5453
Replies: 1 comment 1 reply
-
|
In the
I'm not sure I understand? If a fragment isn't in the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
fragment_bitmapfield. If thefragment_bitmapis{0, 1}, we say it covers both fragment 0 and fragment 1.fragment_bitmap, we mask out all row addresses matching that deleted fragment.Proposed changes
invalidated_fragments, representing fragments for which the rows in an index segment should be not be considered in queries.fragment_bitmapandinvalidated_fragments. This should be mutually exclusive across fragments.fragment_bitmapmay now overlap. For example, you might have one index segment withfragment_bitmap: {0, 1}, invalidated_fragments: {1}, and another index segment withfragment_bitmap: {1}, invalidated_fragments: {}. This might happen if the first index was built on both fragment, then fragment 1 was updated in place, and then a new index segment was trained on the updated fragment.fragment_bitmapof the resulting index. Failing to do either could lead to incorrect query results.invalidated_fragmentsfield of the resulting index. Failing to do either could lead to incorrect query results.Frequently asked questions
Why not just modify
fragment_bitmap?To construct a mask for deleted fragments, we take
fragment_bitmap \ fragment_in_dataset. If we start removing fragments in thefragment_bitmap, then this calculation will not be valid anymore. We could switch to using an allow_list forfragment_bitmap, but for performance reasons we'd like to keep the deleted fragments filter to be a deny list, as this lets the case of no deletions be a no-op.Further reading
invalidated_fragmentsfor index segments #5441Beta Was this translation helpful? Give feedback.
All reactions