diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-06-03 10:31:18 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-06-03 10:31:18 +0000 |
commit | d3bdb50bd5f4c2b76c7bdd6e7dd4712013cb710a (patch) | |
tree | c283924cc970de0eec16b85c6790bcc8b7ad482e /storage/src | |
parent | 6d7ba4368a8d81247fa66bfe60557dadaffb4108 (diff) |
Dispatch get and visitor messages to correct distributor stripe.
Diffstat (limited to 'storage/src')
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor.cpp | 7 |
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(); } |