diff options
author | HÃ¥vard Pettersen <3535158+havardpe@users.noreply.github.com> | 2022-05-20 15:38:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 15:38:51 +0200 |
commit | b13e6071410d51b31b956cf4c856d21334d9fd41 (patch) | |
tree | 2660eb530af104361622e56d14dc23dfa03c02e4 /storage | |
parent | f5f7b0cb60569fc05c100a8b83b9fd721ec37183 (diff) | |
parent | 34dc3ae992c1a2a36b915e17560e94aff0bac95e (diff) |
Merge pull request #22683 from vespa-engine/havardpe/wait-for-locks-to-be-released-when-deleting-file-stor-handler-impl
wait for locks to be released in the destructor
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index c44ae305fa2..0f897d753f6 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -78,7 +78,10 @@ FileStorHandlerImpl::FileStorHandlerImpl(uint32_t numThreads, uint32_t numStripe _component.registerMetricUpdateHook(*this, framework::SecondTime(5)); } -FileStorHandlerImpl::~FileStorHandlerImpl() = default; +FileStorHandlerImpl::~FileStorHandlerImpl() +{ + waitUntilNoLocks(); +} void FileStorHandlerImpl::addMergeStatus(const document::Bucket& bucket, std::shared_ptr<MergeStatus> status) @@ -1171,7 +1174,6 @@ FileStorHandlerImpl::Stripe::release(const document::Bucket & bucket, if (!entry._exclusiveLock && entry._sharedLocks.empty()) { _lockedBuckets.erase(iter); // No more locks held } - guard.unlock(); _cond->notify_all(); } |