IOTSTOR-951: Unlock the master mutex even after garbage_collect()

pull/11971/head
Seppo Takalo 2019-11-28 14:33:07 +02:00
parent 7b0a3dcebd
commit 7f7b191077
1 changed files with 3 additions and 4 deletions

View File

@ -663,16 +663,15 @@ int TDBStore::set_finalize(set_handle_t handle)
}
end:
if ((need_gc) && (ih->bd_base_offset != _master_record_offset)) {
garbage_collection();
}
// mark handle as invalid by clearing magic field in header
ih->header.magic = 0;
_inc_set_mutex.unlock();
if (ih->bd_base_offset != _master_record_offset) {
if (need_gc) {
garbage_collection();
}
_mutex.unlock();
}
return ret;