Skip to content

Commit 7f7b191

Browse files
author
Seppo Takalo
committed
IOTSTOR-951: Unlock the master mutex even after garbage_collect()
1 parent 7b0a3dc commit 7f7b191

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

features/storage/kvstore/tdbstore/TDBStore.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -663,16 +663,15 @@ int TDBStore::set_finalize(set_handle_t handle)
663663
}
664664

665665
end:
666-
if ((need_gc) && (ih->bd_base_offset != _master_record_offset)) {
667-
garbage_collection();
668-
}
669-
670666
// mark handle as invalid by clearing magic field in header
671667
ih->header.magic = 0;
672668

673669
_inc_set_mutex.unlock();
674670

675671
if (ih->bd_base_offset != _master_record_offset) {
672+
if (need_gc) {
673+
garbage_collection();
674+
}
676675
_mutex.unlock();
677676
}
678677
return ret;

0 commit comments

Comments
 (0)