From 35ab8d933184804884a90b2852463ab6db2a4636 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 26 Nov 2020 09:29:10 +0000 Subject: Use correct storage cluster name. --- searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp | 2 +- storage/src/tests/distributor/bucketdbupdatertest.cpp | 2 +- storage/src/tests/persistence/filestorage/filestormanagertest.cpp | 4 ++-- storage/src/tests/visiting/visitormanagertest.cpp | 2 +- storageapi/src/vespa/storageapi/messageapi/storagemessage.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp b/searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp index 18fb0f21fd9..a1b40c56e11 100644 --- a/searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp +++ b/searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp @@ -42,7 +42,7 @@ BmClusterController::BmClusterController(SharedRpcResources& shared_rpc_resource void BmClusterController::set_cluster_up(bool distributor) { - static vespalib::string _storage; + static vespalib::string _storage("storage"); StorageMessageAddress storage_address(&_storage, distributor ? NodeType::DISTRIBUTOR : NodeType::STORAGE, 0); auto req = make_set_cluster_state_request(); auto target_resolver = std::make_unique(_shared_rpc_resources.slobrok_mirror(), diff --git a/storage/src/tests/distributor/bucketdbupdatertest.cpp b/storage/src/tests/distributor/bucketdbupdatertest.cpp index 531af27c7f3..e42f024b730 100644 --- a/storage/src/tests/distributor/bucketdbupdatertest.cpp +++ b/storage/src/tests/distributor/bucketdbupdatertest.cpp @@ -392,7 +392,7 @@ public: } api::StorageMessageAddress storageAddress(uint16_t node) { - static vespalib::string _storage; + static vespalib::string _storage("storage"); return api::StorageMessageAddress(&_storage, lib::NodeType::STORAGE, node); } diff --git a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp index 709981921a6..39bbfa21e4e 100644 --- a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp +++ b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp @@ -1347,7 +1347,7 @@ TEST_F(FileStorManagerTest, delete_bucket) { // Putting it { auto cmd = std::make_shared(makeDocumentBucket(bid), doc, 105); - cmd->setAddress(_Storage3); + cmd->setAddress(_Storage2); top.sendDown(cmd); top.waitForMessages(1, _waitTime); ASSERT_EQ(1, top.getNumReplies()); @@ -1363,7 +1363,7 @@ TEST_F(FileStorManagerTest, delete_bucket) { // Delete bucket { auto cmd = std::make_shared(makeDocumentBucket(bid)); - cmd->setAddress(_Storage3); + cmd->setAddress(_Storage2); cmd->setBucketInfo(bucketInfo); top.sendDown(cmd); top.waitForMessages(1, _waitTime); diff --git a/storage/src/tests/visiting/visitormanagertest.cpp b/storage/src/tests/visiting/visitormanagertest.cpp index 6b222d3c4ed..d5c558c5a0d 100644 --- a/storage/src/tests/visiting/visitormanagertest.cpp +++ b/storage/src/tests/visiting/visitormanagertest.cpp @@ -36,7 +36,7 @@ namespace storage { namespace { using msg_ptr_vector = std::vector; -vespalib::string _Storage; +vespalib::string _Storage("storage"); api::StorageMessageAddress _Address(&_Storage, lib::NodeType::STORAGE, 0); } diff --git a/storageapi/src/vespa/storageapi/messageapi/storagemessage.h b/storageapi/src/vespa/storageapi/messageapi/storagemessage.h index 21d2d1b8e13..b22a9a6566f 100644 --- a/storageapi/src/vespa/storageapi/messageapi/storagemessage.h +++ b/storageapi/src/vespa/storageapi/messageapi/storagemessage.h @@ -275,7 +275,7 @@ private: public: StorageMessageAddress(); // Only to be used when transient default ctor semantics are needed by containers - StorageMessageAddress(const vespalib::string * clusterName, const lib::NodeType& type, uint16_t index); + StorageMessageAddress(const vespalib::string * cluster, const lib::NodeType& type, uint16_t index); StorageMessageAddress(const vespalib::string * cluster, const lib::NodeType& type, uint16_t index, Protocol protocol); ~StorageMessageAddress(); -- cgit v1.2.3