diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-13 07:20:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 07:20:57 +0100 |
commit | 02f7d822efd3c7b03a8e1d45f5c1c77b98423811 (patch) | |
tree | a3efc9c4e631a39faf913999ad559dca2658a553 | |
parent | e308c402b1e0790e735462eb9dfdd7a08dc98708 (diff) | |
parent | 3cb3972653c9b13b56c17db8d518815a80c842e4 (diff) |
Merge pull request #25554 from vespa-engine/balder/differentiate-shared-exclusive-lock-release
Notify outside lock.
-rw-r--r-- | storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index 56b10a67a79..f9709479126 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -1185,7 +1185,12 @@ FileStorHandlerImpl::Stripe::release(const document::Bucket & bucket, if (!entry._exclusiveLock && entry._sharedLocks.empty()) { _lockedBuckets.erase(iter); // No more locks held } - _cond->notify_all(); + guard.unlock(); + if (entry._exclusiveLock) { + _cond->notify_all(); + } else if (entry._sharedLocks.empty()) { + _cond->notify_one(); + } } void |