diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-12 17:41:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 17:41:50 +0100 |
commit | 1862d9745ddeb0fadbdc1330e093b2532ed5f4ef (patch) | |
tree | 9fc67e355097c843d2623f0598d28e3cef4ce9b8 | |
parent | 95454080298e628920f310ccaaa9fd1487824d7f (diff) | |
parent | cc22e64d4c23ae04174e151c579d0c21376eb9e4 (diff) |
Merge pull request #25546 from vespa-engine/balder/notify-only-one-while-holding-lock
Notify only one, and hold the lock if you did not get anything to dis…
-rw-r--r-- | storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index 5886172b9cd..402beef0f11 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -1116,10 +1116,7 @@ FileStorHandlerImpl::Stripe::schedule_and_get_next_async_message(MessageEntry en update_cached_queue_size(guard); auto lockedMessage = get_next_async_message(guard); if ( ! lockedMessage.msg) { - if (guard.owns_lock()) { - guard.unlock(); - } - _cond->notify_all(); + _cond->notify_one(); } return lockedMessage; } |