diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-06-16 12:30:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 12:30:25 +0200 |
commit | 43447f3db319fc41ea5ad52cb0a9352e804d87b7 (patch) | |
tree | d42dabfe34dbcfcde852c2924800cd5aa84bade4 /storage | |
parent | 9e60c04f72b733417788f0015e3fa3ba11273796 (diff) | |
parent | c0b808b7321c519eb40a92788a9ca2c2203ffc57 (diff) |
Merge pull request #18287 from vespa-engine/geirst/fix-stripe-dispatch-of-request-bucket-info-reply
Dispatch RequestBucketInfoReply for non-existing buckets to correct d…
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) { |