Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
sanketkedia committed Dec 4, 2024
1 parent 0494e91 commit c15361a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rust/index/src/spann/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,13 @@ impl SpannIndexWriter {
}
// Increment version and trigger append.
{
let version_map_guard = self.versions_map.write();
let mut version_map_guard = self.versions_map.write();
let current_version = version_map_guard
.versions_map
.get(&doc_offset_id)
.ok_or(SpannIndexWriterError::VersionNotFound)?;
if doc_version < *current_version {
Ok(())
return Ok(());
}
let next_version = *current_version + 1;
version_map_guard
Expand Down Expand Up @@ -854,15 +854,17 @@ impl SpannIndexWriter {
}
}
// Reassign code.
self.collect_and_reassign(
// The Box::pin is to make compiler happy since this code is
// async recursive.
Box::pin(self.collect_and_reassign(
&new_head_ids,
&new_head_embeddings,
head_id,
&head_embedding,
&new_doc_offset_ids,
&new_doc_versions,
&new_posting_lists,
)
))
.await
}

Expand Down

0 comments on commit c15361a

Please sign in to comment.