Skip to content

Commit

Permalink
fix: latent bug in index append (#1865)
Browse files Browse the repository at this point in the history
this is a latent bug that only happens when there is concurrent:
* compact WITH index remap, and
* index append
because compact can reserve fragment ids and a smaller fragment id can
now show up in a later commit.

By calling `push`, the new fragment with smaller id is never added to
the bitmap
  • Loading branch information
chebbyChefNEQ authored Jan 25, 2024
1 parent a9be7af commit 771fe5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/lance/src/index/append.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub async fn merge_indices<'a>(
frag_bitmap.extend(idx.fragment_bitmap.as_ref().unwrap().iter());
});
unindexed.iter().for_each(|frag| {
frag_bitmap.push(frag.id as u32);
frag_bitmap.insert(frag.id as u32);
});

let (new_uuid, indices_merged) = match indices[0].index_type() {
Expand Down

0 comments on commit 771fe5f

Please sign in to comment.