aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-10-26 14:50:47 +0200
committerGitHub <noreply@github.com>2023-10-26 14:50:47 +0200
commitbce3b8e926bf9da880172acbe1ba4b12d5e026d6 (patch)
tree8b650069c2dde19b617427a0134ec24aaafdf03e
parent5b814937a6475ca773c364c68ad0fb5c552fb000 (diff)
parentf27c64e37294fb34f21c4d4e1921119eace031a3 (diff)
Merge pull request #29116 from vespa-engine/vekterli/upper-bound-inhibition-of-inflight-delete-bucket-ops
Use same concurrency inhibition for DeleteBucket as for merge ops
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp7
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 a96bee2d11a..1984d44652a 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -1127,7 +1127,7 @@ FileStorHandlerImpl::Stripe::flush()
namespace {
bool
-message_type_is_merge_related(api::MessageType::Id msg_type_id) {
+message_type_is_merge_related(api::MessageType::Id msg_type_id) noexcept {
switch (msg_type_id) {
case api::MessageType::MERGEBUCKET_ID:
case api::MessageType::MERGEBUCKET_REPLY_ID:
@@ -1135,6 +1135,11 @@ message_type_is_merge_related(api::MessageType::Id msg_type_id) {
case api::MessageType::GETBUCKETDIFF_REPLY_ID:
case api::MessageType::APPLYBUCKETDIFF_ID:
case api::MessageType::APPLYBUCKETDIFF_REPLY_ID:
+ // DeleteBucket is usually (but not necessarily) executed in the context of a higher-level
+ // merge operation, but we include it here since we want to enforce that not all threads
+ // in a stripe can dispatch a bucket delete at the same time. This also provides a strict
+ // upper bound on the number of in-flight bucket deletes in the persistence core.
+ case api::MessageType::DELETEBUCKET_ID:
return true;
default: return false;
}