diff options
author | HÃ¥kon Hallingstad <hakon@oath.com> | 2017-10-23 20:31:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 20:31:31 +0200 |
commit | f777a0c3323d2fad706addb5426e1889f5332e0d (patch) | |
tree | 7532bba6326061e0294acb468cab96e42ee52e3c /storage | |
parent | 0d7ce451d2d4cda2ee6938573d130bd3ccff092b (diff) |
Revert "Use existing bucket space instead of placeholder value"
Diffstat (limited to 'storage')
15 files changed, 42 insertions, 65 deletions
diff --git a/storage/src/tests/bucketdb/bucketmanagertest.cpp b/storage/src/tests/bucketdb/bucketmanagertest.cpp index 8cc046861be..98f3e06fc62 100644 --- a/storage/src/tests/bucketdb/bucketmanagertest.cpp +++ b/storage/src/tests/bucketdb/bucketmanagertest.cpp @@ -15,7 +15,6 @@ #include <tests/common/dummystoragelink.h> #include <tests/common/testhelper.h> #include <vespa/document/test/make_document_bucket.h> -#include <vespa/document/test/make_bucket_space.h> #include <vespa/vdslib/state/random.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/testkit/testapp.h> @@ -32,7 +31,6 @@ using config::FileSpec; using document::DocumentType; using document::DocumentTypeRepo; using document::test::makeDocumentBucket; -using document::test::makeBucketSpace; namespace storage { @@ -417,13 +415,13 @@ void BucketManagerTest::testRequestBucketInfoWithState() // Send a request bucket info command that will be outdated and failed. std::shared_ptr<api::RequestBucketInfoCommand> cmd1( - new api::RequestBucketInfoCommand(makeBucketSpace(), 0, states[1])); + new api::RequestBucketInfoCommand(0, states[1])); // Send two request bucket info commands that will be processed together // when the bucket manager is idle, as states are equivalent std::shared_ptr<api::RequestBucketInfoCommand> cmd2( - new api::RequestBucketInfoCommand(makeBucketSpace(), 0, states[2])); + new api::RequestBucketInfoCommand(0, states[2])); std::shared_ptr<api::RequestBucketInfoCommand> cmd3( - new api::RequestBucketInfoCommand(makeBucketSpace(), 0, states[3])); + new api::RequestBucketInfoCommand(0, states[3])); // Tag server initialized before starting _top->open(); @@ -561,7 +559,7 @@ void BucketManagerTest::testRequestBucketInfoWithList() bids.push_back(document::BucketId(16, 0xe8c8)); std::shared_ptr<api::RequestBucketInfoCommand> cmd( - new api::RequestBucketInfoCommand(makeBucketSpace(), bids)); + new api::RequestBucketInfoCommand(bids)); _top->sendDown(cmd); _top->waitForMessages(1, 5); @@ -731,11 +729,11 @@ public: } auto createFullFetchCommand() const { - return std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), 0, _state); + return std::make_shared<api::RequestBucketInfoCommand>(0, _state); } auto createFullFetchCommandWithHash(vespalib::stringref hash) const { - return std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), 0, _state, hash); + return std::make_shared<api::RequestBucketInfoCommand>(0, _state, hash); } auto acquireBucketLockAndSendInfoRequest(const document::BucketId& bucket) { @@ -909,7 +907,7 @@ BucketManagerTest::testOrderRepliesAfterBucketSpecificRequest() auto infoRoundtrip = std::async(std::launch::async, [&]() { std::vector<document::BucketId> buckets{bucketA}; - auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), buckets); + auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(buckets); // Can't complete until `guard` has been unlocked. _top->sendDown(infoCmd); // Barrier: bucket reply and subsequent split reply @@ -949,7 +947,7 @@ BucketManagerTest::testQueuedRepliesOnlyDispatchedWhenAllProcessingDone() auto singleBucketInfo = std::async(std::launch::async, [&]() { std::vector<document::BucketId> buckets{bucketA}; - auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), buckets); + auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(buckets); _top->sendDown(infoCmd); _top->waitForMessages(3, MESSAGE_WAIT_TIME); }); @@ -1211,7 +1209,7 @@ void BucketManagerTest::sendSingleBucketInfoRequest(const document::BucketId& id) { std::vector<document::BucketId> buckets{id}; - auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), buckets); + auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(buckets); _top->sendDown(infoCmd); } diff --git a/storage/src/tests/distributor/distributortest.cpp b/storage/src/tests/distributor/distributortest.cpp index 4be9735c0f7..b830aa6d506 100644 --- a/storage/src/tests/distributor/distributortest.cpp +++ b/storage/src/tests/distributor/distributortest.cpp @@ -10,14 +10,12 @@ #include <vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h> #include <tests/distributor/distributortestutil.h> #include <vespa/document/test/make_document_bucket.h> -#include <vespa/document/test/make_bucket_space.h> #include <vespa/storage/config/config-stor-distributormanager.h> #include <tests/common/dummystoragelink.h> #include <vespa/storage/distributor/distributor.h> #include <vespa/vespalib/text/stringtokenizer.h> using document::test::makeDocumentBucket; -using document::test::makeBucketSpace; namespace storage { @@ -211,7 +209,7 @@ Distributor_Test::testOperationGeneration() document::DocumentId("userdoc:m:1:foo"), api::Timestamp(1234)))); - api::CreateVisitorCommand* cmd = new api::CreateVisitorCommand(makeBucketSpace(), "foo", "bar", ""); + api::CreateVisitorCommand* cmd = new api::CreateVisitorCommand("foo", "bar", ""); cmd->addBucketToBeVisited(document::BucketId(16, 1)); cmd->addBucketToBeVisited(document::BucketId()); diff --git a/storage/src/tests/distributor/idealstatemanagertest.cpp b/storage/src/tests/distributor/idealstatemanagertest.cpp index d4d7a00a2df..e48046fb4ac 100644 --- a/storage/src/tests/distributor/idealstatemanagertest.cpp +++ b/storage/src/tests/distributor/idealstatemanagertest.cpp @@ -10,10 +10,8 @@ #include <vespa/storageapi/message/bucketsplitting.h> #include <tests/distributor/distributortestutil.h> #include <vespa/document/test/make_document_bucket.h> -#include <vespa/document/test/make_bucket_space.h> using document::test::makeDocumentBucket; -using document::test::makeBucketSpace; namespace storage { namespace distributor { @@ -200,7 +198,7 @@ IdealStateManagerTest::testBlockIdealStateOpsOnFullRequestBucketInfo() // sent to the entire node. It will then use a null bucketid. { std::shared_ptr<api::RequestBucketInfoCommand> msg( - new api::RequestBucketInfoCommand(makeBucketSpace(), buckets)); + new api::RequestBucketInfoCommand(buckets)); msg->setAddress( api::StorageMessageAddress("storage", lib::NodeType::STORAGE, 4)); tracker.insert(msg); @@ -222,7 +220,7 @@ IdealStateManagerTest::testBlockIdealStateOpsOnFullRequestBucketInfo() // Don't block on null-bucket messages that aren't RequestBucketInfo. { std::shared_ptr<api::CreateVisitorCommand> msg( - new api::CreateVisitorCommand(makeBucketSpace(), "foo", "bar", "baz")); + new api::CreateVisitorCommand("foo", "bar", "baz")); msg->setAddress( api::StorageMessageAddress("storage", lib::NodeType::STORAGE, 7)); tracker.insert(msg); diff --git a/storage/src/tests/distributor/visitoroperationtest.cpp b/storage/src/tests/distributor/visitoroperationtest.cpp index f12e1fa4e33..c8f339f6626 100644 --- a/storage/src/tests/distributor/visitoroperationtest.cpp +++ b/storage/src/tests/distributor/visitoroperationtest.cpp @@ -13,13 +13,11 @@ #include <vespa/storage/distributor/distributor.h> #include <tests/common/dummystoragelink.h> #include <vespa/vdstestlib/cppunit/macros.h> -#include <vespa/document/test/make_bucket_space.h> using namespace document; using namespace storage::api; using namespace storage::lib; using namespace std::string_literals; -using document::test::makeBucketSpace; namespace storage { namespace distributor { @@ -150,7 +148,7 @@ private: const std::string& docSelection = "") { api::CreateVisitorCommand::SP cmd( - new api::CreateVisitorCommand(makeBucketSpace(), libraryName, instanceId, docSelection)); + new api::CreateVisitorCommand(libraryName, instanceId, docSelection)); cmd->setControlDestination("controldestination"); cmd->setDataDestination("datadestination"); cmd->setFieldSet("[header]"); @@ -267,8 +265,7 @@ VisitorOperationTest::doStandardVisitTest(const std::string& clusterState) vespalib::string libraryName("dumpvisitor"); vespalib::string docSelection(""); api::CreateVisitorCommand::SP msg( - new api::CreateVisitorCommand(makeBucketSpace(), - libraryName, + new api::CreateVisitorCommand(libraryName, instanceId, docSelection)); vespalib::string controlDestination("controldestination"); @@ -336,8 +333,7 @@ VisitorOperationTest::testShutdown() vespalib::string libraryName("dumpvisitor"); vespalib::string docSelection(""); api::CreateVisitorCommand::SP msg( - new api::CreateVisitorCommand(makeBucketSpace(), - libraryName, + new api::CreateVisitorCommand(libraryName, instanceId, docSelection)); msg->addBucketToBeVisited(id); @@ -365,7 +361,7 @@ VisitorOperationTest::testNoBucket() // Send create visitor api::CreateVisitorCommand::SP msg(new api::CreateVisitorCommand( - makeBucketSpace(), "dumpvisitor", "instance", "")); + "dumpvisitor", "instance", "")); CPPUNIT_ASSERT_EQUAL(std::string( "CreateVisitorReply(last=BucketId(0x0000000000000000)) " @@ -381,7 +377,7 @@ VisitorOperationTest::testOnlySuperBucketAndProgressAllowed() // Send create visitor api::CreateVisitorCommand::SP msg(new api::CreateVisitorCommand( - makeBucketSpace(), "dumpvisitor", "instance", "")); + "dumpvisitor", "instance", "")); msg->addBucketToBeVisited(nullId); msg->addBucketToBeVisited(nullId); msg->addBucketToBeVisited(nullId); diff --git a/storage/src/tests/visiting/commandqueuetest.cpp b/storage/src/tests/visiting/commandqueuetest.cpp index 7b6d5dcafd6..91f196a9339 100644 --- a/storage/src/tests/visiting/commandqueuetest.cpp +++ b/storage/src/tests/visiting/commandqueuetest.cpp @@ -5,11 +5,9 @@ #include <vespa/storageapi/message/visitor.h> #include <vespa/vdstestlib/cppunit/macros.h> #include <vespa/vespalib/stllike/asciistream.h> -#include <vespa/document/test/make_bucket_space.h> using vespalib::string; -using document::test::makeBucketSpace; namespace storage { @@ -41,7 +39,7 @@ namespace { ost << name << " t=" << timeout << " p=" << static_cast<unsigned int>(priority); // Piggyback name in document selection std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "", "", ost.str())); + new api::CreateVisitorCommand("", "", ost.str())); cmd->setQueueTimeout(timeout); cmd->setPriority(priority); return cmd; diff --git a/storage/src/tests/visiting/visitormanagertest.cpp b/storage/src/tests/visiting/visitormanagertest.cpp index 5da86a134e2..3c5780cf77c 100644 --- a/storage/src/tests/visiting/visitormanagertest.cpp +++ b/storage/src/tests/visiting/visitormanagertest.cpp @@ -13,7 +13,6 @@ #include <tests/common/testhelper.h> #include <tests/common/dummystoragelink.h> #include <vespa/document/test/make_document_bucket.h> -#include <vespa/document/test/make_bucket_space.h> #include <tests/storageserver/testvisitormessagesession.h> #include <vespa/documentapi/messagebus/messages/multioperationmessage.h> #include <vespa/documentapi/messagebus/messages/putdocumentmessage.h> @@ -22,7 +21,6 @@ #include <vespa/vespalib/util/exceptions.h> using document::test::makeDocumentBucket; -using document::test::makeBucketSpace; namespace storage { namespace { @@ -412,7 +410,7 @@ VisitorManagerTest::testNormalUsage() initializeTest(); api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", "")); + new api::CreateVisitorCommand("DumpVisitor", "testvis", "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setControlDestination("foo/bar"); @@ -438,7 +436,7 @@ VisitorManagerTest::testResending() initializeTest(); api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", "")); + new api::CreateVisitorCommand("DumpVisitor", "testvis", "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setControlDestination("foo/bar"); @@ -488,7 +486,7 @@ VisitorManagerTest::testVisitEmptyBucket() addSomeRemoves(true); api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", "")); + new api::CreateVisitorCommand("DumpVisitor", "testvis", "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); @@ -504,7 +502,7 @@ VisitorManagerTest::testMultiBucketVisit() initializeTest(); api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", "")); + new api::CreateVisitorCommand("DumpVisitor", "testvis", "")); for (uint32_t i=0; i<10; ++i) { cmd->addBucketToBeVisited(document::BucketId(16, i)); } @@ -529,7 +527,7 @@ VisitorManagerTest::testNoBuckets() initializeTest(); api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", "")); + new api::CreateVisitorCommand("DumpVisitor", "testvis", "")); cmd->setAddress(address); _top->sendDown(cmd); @@ -555,7 +553,7 @@ void VisitorManagerTest::testVisitPutsAndRemoves() addSomeRemoves(); api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", "")); + new api::CreateVisitorCommand("DumpVisitor", "testvis", "")); cmd->setAddress(address); cmd->setVisitRemoves(); for (uint32_t i=0; i<10; ++i) { @@ -583,7 +581,7 @@ void VisitorManagerTest::testVisitWithTimeframeAndSelection() initializeTest(); api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", + new api::CreateVisitorCommand("DumpVisitor", "testvis", "testdoctype1.headerval < 2")); cmd->setFromTime(3); cmd->setToTime(8); @@ -615,7 +613,7 @@ void VisitorManagerTest::testVisitWithTimeframeAndBogusSelection() initializeTest(); api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", + new api::CreateVisitorCommand("DumpVisitor", "testvis", "DocType(testdoctype1---///---) XXX BAD Field(headerval) < 2")); cmd->setFromTime(3); cmd->setToTime(8); @@ -643,7 +641,7 @@ VisitorManagerTest::testVisitorCallbacks() std::ostringstream replydata; api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "TestVisitor", "testvis", "")); + new api::CreateVisitorCommand("TestVisitor", "testvis", "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->addBucketToBeVisited(document::BucketId(16, 5)); cmd->setAddress(address); @@ -692,7 +690,7 @@ VisitorManagerTest::testVisitorCleanup() std::ostringstream ost; ost << "testvis" << i; std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "InvalidVisitor", ost.str(), "")); + new api::CreateVisitorCommand("InvalidVisitor", ost.str(), "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setQueueTimeout(0); @@ -705,7 +703,7 @@ VisitorManagerTest::testVisitorCleanup() std::ostringstream ost; ost << "testvis" << (i + 10); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", ost.str(), "")); + new api::CreateVisitorCommand("DumpVisitor", ost.str(), "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setQueueTimeout(0); @@ -769,7 +767,7 @@ VisitorManagerTest::testVisitorCleanup() std::ostringstream ost; ost << "testvis" << (i + 24); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", ost.str(), "")); + new api::CreateVisitorCommand("DumpVisitor", ost.str(), "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setQueueTimeout(0); @@ -800,7 +798,7 @@ VisitorManagerTest::testAbortOnFailedVisitorInfo() { std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", "")); + new api::CreateVisitorCommand("DumpVisitor", "testvis", "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setQueueTimeout(0); @@ -865,7 +863,7 @@ VisitorManagerTest::testAbortOnFieldPathError() // Use bogus field path to force error to happen std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", + new api::CreateVisitorCommand("DumpVisitor", "testvis", "testdoctype1.headerval{bogus} == 1234")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); @@ -887,7 +885,7 @@ VisitorManagerTest::testVisitorQueueTimeout() vespalib::MonitorGuard guard(_manager->getThread(0).getQueueMonitor()); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", "")); + new api::CreateVisitorCommand("DumpVisitor", "testvis", "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setQueueTimeout(1); @@ -920,7 +918,7 @@ VisitorManagerTest::testVisitorProcessingTimeout() api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", "testvis", "")); + new api::CreateVisitorCommand("DumpVisitor", "testvis", "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setQueueTimeout(0); @@ -957,7 +955,7 @@ namespace { ost << "testvis" << ++nextVisitor; api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), "DumpVisitor", ost.str(), "")); + new api::CreateVisitorCommand("DumpVisitor", ost.str(), "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setQueueTimeout(timeout); diff --git a/storage/src/tests/visiting/visitortest.cpp b/storage/src/tests/visiting/visitortest.cpp index 00051d64b90..8abe7a3857d 100644 --- a/storage/src/tests/visiting/visitortest.cpp +++ b/storage/src/tests/visiting/visitortest.cpp @@ -4,7 +4,6 @@ #include <vespa/document/fieldvalue/intfieldvalue.h> #include <vespa/document/fieldvalue/stringfieldvalue.h> #include <vespa/document/fieldvalue/rawfieldvalue.h> -#include <vespa/document/test/make_bucket_space.h> #include <vespa/storageapi/message/datagram.h> #include <vespa/storageapi/message/persistence.h> #include <vespa/storage/persistence/filestorage/filestormanager.h> @@ -21,7 +20,6 @@ #include <thread> using namespace std::chrono_literals; -using document::test::makeBucketSpace; namespace storage { @@ -492,7 +490,7 @@ VisitorTest::makeCreateVisitor(const VisitorOptions& options) { api::StorageMessageAddress address("storage", lib::NodeType::STORAGE, 0); std::shared_ptr<api::CreateVisitorCommand> cmd( - new api::CreateVisitorCommand(makeBucketSpace(), options.visitorType, "testvis", "")); + new api::CreateVisitorCommand(options.visitorType, "testvis", "")); cmd->addBucketToBeVisited(document::BucketId(16, 3)); cmd->setAddress(address); cmd->setMaximumPendingReplyCount(UINT32_MAX); diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp index 2a056949f9a..ce7f7afc670 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp +++ b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp @@ -14,7 +14,6 @@ LOG_SETUP(".distributor.bucketdb.updater"); using storage::lib::Node; using storage::lib::NodeType; -using document::BucketSpace; namespace storage::distributor { @@ -82,7 +81,7 @@ BucketDBUpdater::sendRequestBucketInfo( buckets.push_back(bucket); std::shared_ptr<api::RequestBucketInfoCommand> msg( - new api::RequestBucketInfoCommand(BucketSpace::placeHolder(), buckets)); + new api::RequestBucketInfoCommand(buckets)); LOG(debug, "Sending request bucket info command %lu for " diff --git a/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp index b71e2728f5b..20a804180f5 100644 --- a/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/getoperation.cpp @@ -100,7 +100,7 @@ GetOperation::sendForChecksum(DistributorMessageSender& sender, const int best = findBestUnsentTarget(res); if (best != -1) { - document::Bucket bucket(_msg->getBucket().getBucketSpace(), id); + document::Bucket bucket(BucketSpace::placeHolder(), id); std::shared_ptr<api::GetCommand> command( std::make_shared<api::GetCommand>( bucket, diff --git a/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.cpp index 19c693e2a7f..a3fb083890b 100644 --- a/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/multioperationoperation.cpp @@ -192,7 +192,7 @@ MultiOperationOperation::onStart(DistributorMessageSender& sender) } assert(blockSize > 4); - document::Bucket bucket(_msg->getBucket().getBucketSpace(), bucketIt->first); + document::Bucket bucket(BucketSpace::placeHolder(), bucketIt->first); //now create a MultiOperationCommand with the new DocumentList std::shared_ptr<api::MultiOperationCommand> command(new api::MultiOperationCommand( diff --git a/storage/src/vespa/storage/distributor/operations/external/putoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/putoperation.cpp index b1fa0d98bb0..9b6390c149a 100644 --- a/storage/src/vespa/storage/distributor/operations/external/putoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/putoperation.cpp @@ -116,7 +116,7 @@ PutOperation::checkCreateBucket(const lib::Distribution& dist, // Send create buckets for all nodes in ideal state where we don't // currently have copies. for (uint32_t i = 0; i < createNodes.size(); i++) { - document::Bucket bucket(originalCommand.getBucket().getBucketSpace(), entry.getBucketId()); + document::Bucket bucket(BucketSpace::placeHolder(), entry.getBucketId()); std::shared_ptr<api::CreateBucketCommand> cbc( new api::CreateBucketCommand(bucket)); if (active.contains(createNodes[i])) { @@ -207,7 +207,7 @@ PutOperation::insertDatabaseEntryAndScheduleCreateBucket( } for (uint32_t i=0, n=copies.size(); i<n; ++i) { if (!copies[i].isNewCopy()) continue; - document::Bucket bucket(originalCommand.getBucket().getBucketSpace(), copies[i].getBucketId()); + document::Bucket bucket(BucketSpace::placeHolder(), copies[i].getBucketId()); std::shared_ptr<api::CreateBucketCommand> cbc( new api::CreateBucketCommand(bucket)); if (setOneActive && active.contains(copies[i].getNode().getIndex())) { diff --git a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp index 9ad803b7b7f..bd14ded3710 100644 --- a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp +++ b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp @@ -10,8 +10,6 @@ #include <vespa/log/log.h> LOG_SETUP(".pendingclusterstate"); -using document::BucketSpace; - namespace storage::distributor { using lib::Node; @@ -319,7 +317,6 @@ PendingClusterState::requestNode(uint16_t node) std::shared_ptr<api::RequestBucketInfoCommand> cmd( new api::RequestBucketInfoCommand( - BucketSpace::placeHolder(), _sender.getDistributorIndex(), _newClusterState, distributionHash)); diff --git a/storage/src/vespa/storage/storageserver/documentapiconverter.cpp b/storage/src/vespa/storage/storageserver/documentapiconverter.cpp index ddc11e9ad77..acfa07affc7 100644 --- a/storage/src/vespa/storage/storageserver/documentapiconverter.cpp +++ b/storage/src/vespa/storage/storageserver/documentapiconverter.cpp @@ -71,8 +71,7 @@ DocumentApiConverter::toStorageAPI(documentapi::DocumentMessage& fromMsg, case DocumentProtocol::MESSAGE_CREATEVISITOR: { documentapi::CreateVisitorMessage& from(static_cast<documentapi::CreateVisitorMessage&>(fromMsg)); - auto to = std::make_unique<api::CreateVisitorCommand>(BucketSpace::placeHolder(), - from.getLibraryName(), from.getInstanceId(), + auto to = std::make_unique<api::CreateVisitorCommand>(from.getLibraryName(), from.getInstanceId(), from.getDocumentSelection()); to->setControlDestination(from.getControlDestination()); diff --git a/storage/src/vespa/storage/visiting/visitor.h b/storage/src/vespa/storage/visiting/visitor.h index 4436312032f..1c156ff187a 100644 --- a/storage/src/vespa/storage/visiting/visitor.h +++ b/storage/src/vespa/storage/visiting/visitor.h @@ -387,7 +387,6 @@ public: void setMemoryManager(framework::MemoryManagerInterface& mm) { _memoryManager = &mm; } void setOwnNodeIndex(uint16_t nodeIndex) { _ownNodeIndex = nodeIndex; } - void setBucketSpace(document::BucketSpace bucketSpace) { _bucketSpace = bucketSpace; } const documentapi::LoadType& getLoadType() const { return _initiatingCmd->getLoadType(); diff --git a/storage/src/vespa/storage/visiting/visitorthread.cpp b/storage/src/vespa/storage/visiting/visitorthread.cpp index d3fed86b741..8056d7e0ad2 100644 --- a/storage/src/vespa/storage/visiting/visitorthread.cpp +++ b/storage/src/vespa/storage/visiting/visitorthread.cpp @@ -497,7 +497,6 @@ VisitorThread::onCreateVisitor( visitor->setDocBlockTimeout(_defaultDocBlockTimeout); visitor->setVisitorInfoTimeout(_defaultVisitorInfoTimeout); visitor->setOwnNodeIndex(_component.getIndex()); - visitor->setBucketSpace(cmd->getBucketSpace()); // Parse document selection try{ |