Skip to content

Commit a61d65a

Browse files
committed
Prevent dropping the guard
1 parent d4951ca commit a61d65a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rust/blockstore/src/arrow/blockfile.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl ArrowUnorderedBlockfileWriter {
168168
value: V,
169169
) -> Result<(), Box<dyn ChromaError>> {
170170
let search_key = CompositeKey::new(prefix.to_string(), key.clone());
171-
let (_, target_block_id) = loop {
171+
let (_guard, target_block_id) = loop {
172172
// Get the target block id for the key
173173
let target_block_id = self.root.sparse_index.get_target_block_id(&search_key);
174174

@@ -285,7 +285,7 @@ impl ArrowUnorderedBlockfileWriter {
285285
key: K,
286286
) -> Result<Option<V::PreparedValue>, Box<dyn ChromaError>> {
287287
let search_key = CompositeKey::new(prefix.to_string(), key.clone());
288-
let (_, target_block_id) = loop {
288+
let (_guard, target_block_id) = loop {
289289
// Get the target block id for the key
290290
let target_block_id = self.root.sparse_index.get_target_block_id(&search_key);
291291

@@ -357,7 +357,7 @@ impl ArrowUnorderedBlockfileWriter {
357357
key: K,
358358
) -> Result<(), Box<dyn ChromaError>> {
359359
let search_key = CompositeKey::new(prefix.to_string(), key.clone());
360-
let (_, target_block_id) = loop {
360+
let (_guard, target_block_id) = loop {
361361
// Get the target block id for the key
362362
let target_block_id = self.root.sparse_index.get_target_block_id(&search_key);
363363

0 commit comments

Comments
 (0)