summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-09-23 07:16:31 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-09-23 07:16:31 +0000
commitaec20e0986d71c1a8cd4a7a7153bf81b304a233f (patch)
treeaf01498e5b3eeb4645112bdfabe29d0062076f46 /storage
parentdd30a9a839f4b7f5c99e265af091c3f88613f4cd (diff)
Reduce include and visibility of ptrholder.h
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/getoperation.cpp9
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/getoperation.h2
2 files changed, 5 insertions, 6 deletions
diff --git a/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp
index 06872cadde6..df7bfe52904 100644
--- a/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp
+++ b/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp
@@ -6,6 +6,7 @@
#include <vespa/vdslib/state/nodestate.h>
#include <vespa/document/fieldvalue/document.h>
#include <vespa/storage/distributor/distributor_bucket_space.h>
+#include <vespa/document/bucket/bucketidfactory.h>
#include <cassert>
#include <vespa/log/log.h>
@@ -47,7 +48,7 @@ GetOperation::GroupId::operator==(const GroupId& other) const
GetOperation::GetOperation(const DistributorNodeContext& node_ctx,
const DistributorBucketSpace &bucketSpace,
- std::shared_ptr<BucketDatabase::ReadGuard> read_guard,
+ const std::shared_ptr<BucketDatabase::ReadGuard> & read_guard,
std::shared_ptr<api::GetCommand> msg,
PersistenceOperationMetricSet& metric,
api::InternalReadConsistency desired_read_consistency)
@@ -135,7 +136,7 @@ GetOperation::onStart(DistributorStripeMessageSender& sender)
LOG(debug, "No useful bucket copies for get on document %s. Returning without document", _msg->getDocumentId().toString().c_str());
sendReply(sender);
}
-};
+}
void
GetOperation::onReceive(DistributorStripeMessageSender& sender, const std::shared_ptr<api::StorageReply>& msg)
@@ -251,9 +252,7 @@ GetOperation::assignTargetNodeGroups(const BucketDatabase::ReadGuard& read_guard
auto entries = read_guard.find_parents_and_self(bid);
- for (uint32_t j = 0; j < entries.size(); ++j) {
- const BucketDatabase::Entry& e = entries[j];
-
+ for (const auto & e : entries) {
LOG(spam, "Entry for %s: %s", e.getBucketId().toString().c_str(),
e->toString().c_str());
diff --git a/storage/src/vespa/storage/distributor/operations/external/getoperation.h b/storage/src/vespa/storage/distributor/operations/external/getoperation.h
index 943a92f4b36..61443100695 100644
--- a/storage/src/vespa/storage/distributor/operations/external/getoperation.h
+++ b/storage/src/vespa/storage/distributor/operations/external/getoperation.h
@@ -28,7 +28,7 @@ class GetOperation : public Operation
public:
GetOperation(const DistributorNodeContext& node_ctx,
const DistributorBucketSpace &bucketSpace,
- std::shared_ptr<BucketDatabase::ReadGuard> read_guard,
+ const std::shared_ptr<BucketDatabase::ReadGuard> & read_guard,
std::shared_ptr<api::GetCommand> msg,
PersistenceOperationMetricSet& metric,
api::InternalReadConsistency desired_read_consistency = api::InternalReadConsistency::Strong);