Skip to content

Commit 771fe5f

Browse files
fix: latent bug in index append (#1865)
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
1 parent a9be7af commit 771fe5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/lance/src/index/append.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub async fn merge_indices<'a>(
8585
frag_bitmap.extend(idx.fragment_bitmap.as_ref().unwrap().iter());
8686
});
8787
unindexed.iter().for_each(|frag| {
88-
frag_bitmap.push(frag.id as u32);
88+
frag_bitmap.insert(frag.id as u32);
8989
});
9090

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

0 commit comments

Comments
 (0)