diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-06-16 10:02:30 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-06-16 10:02:30 +0000 |
commit | c0b808b7321c519eb40a92788a9ca2c2203ffc57 (patch) | |
tree | 79dd13144bb60e03dac7f4c45398c8ea169e6ca8 /storage | |
parent | 01049d0b94e54d70ab72fe08e4520a36984c4422 (diff) |
Dispatch RequestBucketInfoReply for non-existing buckets to correct distributor stripe.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/storage/src/vespa/storage/distributor/distributor.cpp b/storage/src/vespa/storage/distributor/distributor.cpp index 4e6ae90718c..6f9cbf3b0f2 100644 --- a/storage/src/vespa/storage/distributor/distributor.cpp +++ b/storage/src/vespa/storage/distributor/distributor.cpp @@ -353,15 +353,7 @@ get_bucket_id_for_striping(const api::StorageMessage& msg, const DistributorNode case api::MessageType::REMOVE_ID: return node_ctx.bucket_id_factory().getBucketId(dynamic_cast<const api::TestAndSetCommand&>(msg).getDocumentId()); case api::MessageType::REQUESTBUCKETINFO_REPLY_ID: - { - const auto& reply = dynamic_cast<const api::RequestBucketInfoReply&>(msg); - if (!reply.getBucketInfo().empty()) { - // Note: All bucket ids in this reply belong to the same distributor stripe, so we just use the first entry. - return reply.getBucketInfo()[0]._bucketId; - } else { - return reply.getBucketId(); - } - } + return dynamic_cast<const api::RequestBucketInfoReply&>(msg).super_bucket_id(); 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: @@ -389,7 +381,7 @@ Distributor::stripe_of_bucket_id(const document::BucketId& bucket_id, const api: { if (!bucket_id.isSet()) { LOG(error, "Message (%s) has a bucket id (%s) that is not set. Cannot route to stripe", - msg.getSummary().c_str(), bucket_id.toString().c_str()); + msg.toString(true).c_str(), bucket_id.toString().c_str()); } assert(bucket_id.isSet()); if (bucket_id.getUsedBits() < spi::BucketLimits::MinUsedBits) { |