Skip to content

Commit 01938f5

Browse files
committed
Prevent dropping the guard
1 parent 04eba1c commit 01938f5

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
@@ -166,7 +166,7 @@ impl ArrowUnorderedBlockfileWriter {
166166
value: V,
167167
) -> Result<(), Box<dyn ChromaError>> {
168168
let search_key = CompositeKey::new(prefix.to_string(), key.clone());
169-
let (_, target_block_id) = loop {
169+
let (_guard, target_block_id) = loop {
170170
// Get the target block id for the key
171171
let target_block_id = self.root.sparse_index.get_target_block_id(&search_key);
172172

@@ -279,7 +279,7 @@ impl ArrowUnorderedBlockfileWriter {
279279
key: K,
280280
) -> Result<Option<V::PreparedValue>, Box<dyn ChromaError>> {
281281
let search_key = CompositeKey::new(prefix.to_string(), key.clone());
282-
let (_, target_block_id) = loop {
282+
let (_guard, target_block_id) = loop {
283283
// Get the target block id for the key
284284
let target_block_id = self.root.sparse_index.get_target_block_id(&search_key);
285285

@@ -347,7 +347,7 @@ impl ArrowUnorderedBlockfileWriter {
347347
key: K,
348348
) -> Result<(), Box<dyn ChromaError>> {
349349
let search_key = CompositeKey::new(prefix.to_string(), key.clone());
350-
let (_, target_block_id) = loop {
350+
let (_guard, target_block_id) = loop {
351351
// Get the target block id for the key
352352
let target_block_id = self.root.sparse_index.get_target_block_id(&search_key);
353353

0 commit comments

Comments
 (0)