summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-08-22 22:40:34 +0200
committerGitHub <noreply@github.com>2023-08-22 22:40:34 +0200
commita40a505cd7d15d7797f99df9a1379847975124dd (patch)
treef2364f87bde05f325bad913b407bb224455ca178 /storage
parentfb19a910ad142a5221b50b9fc19db5fa48d006ab (diff)
Revert "Revert "Move condition variable notifications inside critical sections" MERGEOK"
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
index 33022c65e24..808f19be3e5 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -1040,8 +1040,8 @@ FileStorHandlerImpl::Stripe::getMessage(monitor_guard & guard, PriorityIdx & idx
return {std::move(locker), std::move(msg), std::move(throttle_token)};
} else {
std::shared_ptr<api::StorageReply> msgReply(makeQueueTimeoutReply(*msg));
- guard.unlock();
_cond->notify_all();
+ guard.unlock();
_messageSender.sendReply(msgReply);
return {};
}
@@ -1113,9 +1113,6 @@ 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_one();
}
return lockedMessage;
@@ -1185,7 +1182,6 @@ FileStorHandlerImpl::Stripe::release(const document::Bucket & bucket,
_lockedBuckets.erase(iter); // No more locks held
}
bool emptySharedLocks = entry._sharedLocks.empty();
- guard.unlock();
if (wasExclusive) {
_cond->notify_all();
} else if (emptySharedLocks) {
@@ -1201,7 +1197,6 @@ FileStorHandlerImpl::Stripe::decrease_active_sync_merges_counter() noexcept
const bool may_have_blocked_merge = (_active_merges == _owner._max_active_merges_per_stripe);
--_active_merges;
if (may_have_blocked_merge) {
- guard.unlock();
_cond->notify_all();
}
}