summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2021-06-03 13:09:06 +0200
committerGitHub <noreply@github.com>2021-06-03 13:09:06 +0200
commit7ee01cb4f6e9c234b7470646847ae0461bc95344 (patch)
treebda405dab93a8a4c4cf093869012a8e10d9e50a8 /storage
parent01fd8befc5ab6f8e0c7c0982c45126b29dbd7bc0 (diff)
parentd3bdb50bd5f4c2b76c7bdd6e7dd4712013cb710a (diff)
Merge pull request #18102 from vespa-engine/geirst/dispatch-get-and-visitor-messages-to-stripe
Dispatch get and visitor messages to correct distributor stripe.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/distributor/distributor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/storage/src/vespa/storage/distributor/distributor.cpp b/storage/src/vespa/storage/distributor/distributor.cpp
index 368a25315fb..65945b2c6ae 100644
--- a/storage/src/vespa/storage/distributor/distributor.cpp
+++ b/storage/src/vespa/storage/distributor/distributor.cpp
@@ -24,6 +24,7 @@
#include <vespa/storage/config/distributorconfiguration.h>
#include <vespa/storage/distributor/maintenance/simplebucketprioritydatabase.h>
#include <vespa/storageapi/message/persistence.h>
+#include <vespa/storageapi/message/visitor.h>
#include <vespa/storageframework/generic/status/xmlstatusreporter.h>
#include <vespa/vdslib/distribution/distribution.h>
#include <vespa/vespalib/util/memoryusage.h>
@@ -350,6 +351,12 @@ get_bucket_id_for_striping(const api::StorageMessage& msg, const DistributorNode
return reply.getBucketId();
}
}
+ case api::MessageType::GET_ID:
+ return node_ctx.bucket_id_factory().getBucketId(dynamic_cast<const api::GetCommand&>(msg).getDocumentId());
+ case api::MessageType::VISITOR_CREATE_ID:
+ return dynamic_cast<const api::CreateVisitorCommand&>(msg).super_bucket_id();
+ case api::MessageType::VISITOR_CREATE_REPLY_ID:
+ return dynamic_cast<const api::CreateVisitorReply&>(msg).super_bucket_id();
default:
return msg.getBucketId();
}