diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2020-10-14 11:45:31 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2020-10-14 15:51:34 +0200 |
commit | d8d068e38bf581875ab78defae4ea15fa5502e83 (patch) | |
tree | 81d13f191ab5763d196e1c27c3b1a82b55289f74 /persistence | |
parent | 1ea40c61012e36f4cecf93194d3e15ef26a4b642 (diff) |
Remove partitions from SPI.
Diffstat (limited to 'persistence')
15 files changed, 49 insertions, 228 deletions
diff --git a/persistence/src/tests/dummyimpl/dummyimpltest.cpp b/persistence/src/tests/dummyimpl/dummyimpltest.cpp index 7bc27266020..23e59892357 100644 --- a/persistence/src/tests/dummyimpl/dummyimpltest.cpp +++ b/persistence/src/tests/dummyimpl/dummyimpltest.cpp @@ -16,7 +16,7 @@ struct DummyPersistenceFactory : public ConformanceTest::PersistenceFactory { std::unique_ptr<PersistenceProvider> getPersistenceImplementation(const std::shared_ptr<const Repo>& repo, const Repo::DocumenttypesConfig&) override { - return std::make_unique<dummy::DummyPersistence>(repo, 4); + return std::make_unique<dummy::DummyPersistence>(repo); } bool supportsActiveState() const override { return true; } diff --git a/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp b/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp index 1871d8943d8..6ad74b660c1 100644 --- a/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp +++ b/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp @@ -38,7 +38,6 @@ std::unique_ptr<PersistenceProvider> getSpi(ConformanceTest::PersistenceFactory PersistenceProviderUP result(factory.getPersistenceImplementation( testDocMan.getTypeRepoSP(), *testDocMan.getTypeConfig())); EXPECT_TRUE(!result->initialize().hasError()); - EXPECT_TRUE(!result->getPartitionStates().hasError()); return result; } @@ -419,13 +418,12 @@ TEST_F(ConformanceTest, testListBuckets) _factory->clear(); PersistenceProviderUP spi(getSpi(*_factory, testDocMan)); - PartitionId partId(0); BucketId bucketId1(8, 0x01); BucketId bucketId2(8, 0x02); BucketId bucketId3(8, 0x03); - Bucket bucket1(makeSpiBucket(bucketId1, partId)); - Bucket bucket2(makeSpiBucket(bucketId2, partId)); - Bucket bucket3(makeSpiBucket(bucketId3, partId)); + Bucket bucket1(makeSpiBucket(bucketId1)); + Bucket bucket2(makeSpiBucket(bucketId2)); + Bucket bucket3(makeSpiBucket(bucketId3)); Document::SP doc1 = testDocMan.createRandomDocumentAtLocation(0x01, 1); Document::SP doc2 = testDocMan.createRandomDocumentAtLocation(0x02, 2); @@ -440,12 +438,7 @@ TEST_F(ConformanceTest, testListBuckets) spi->put(bucket3, Timestamp(3), doc3, context); { - BucketIdListResult result = spi->listBuckets(makeBucketSpace(), PartitionId(1)); - EXPECT_TRUE(result.getList().empty()); - } - - { - BucketIdListResult result = spi->listBuckets(makeBucketSpace(), partId); + BucketIdListResult result = spi->listBuckets(makeBucketSpace()); const BucketIdListResult::List &bucketList = result.getList(); EXPECT_EQ(3u, (uint32_t)bucketList.size()); EXPECT_TRUE(std::find(bucketList.begin(), bucketList.end(), bucketId1) != bucketList.end()); @@ -2216,10 +2209,9 @@ void assertBucketInfo(PersistenceProvider &spi, const Bucket &bucket, uint32_t e void assertBucketList(PersistenceProvider &spi, BucketSpace &bucketSpace, - PartitionId partId, const std::vector<BucketId> &expBuckets) { - BucketIdListResult result = spi.listBuckets(bucketSpace, partId); + BucketIdListResult result = spi.listBuckets(bucketSpace); const BucketIdListResult::List &bucketList = result.getList(); EXPECT_EQ(expBuckets.size(), bucketList.size()); for (const auto &expBucket : expBuckets) { @@ -2239,13 +2231,12 @@ TEST_F(ConformanceTest, testBucketSpaces) BucketSpace bucketSpace0(makeBucketSpace("testdoctype1")); BucketSpace bucketSpace1(makeBucketSpace("testdoctype2")); BucketSpace bucketSpace2(makeBucketSpace("no")); - PartitionId partId(0); BucketId bucketId1(8, 0x01); BucketId bucketId2(8, 0x02); - Bucket bucket01({ bucketSpace0, bucketId1 }, partId); - Bucket bucket11({ bucketSpace1, bucketId1 }, partId); - Bucket bucket12({ bucketSpace1, bucketId2 }, partId); + Bucket bucket01({ bucketSpace0, bucketId1 }); + Bucket bucket11({ bucketSpace1, bucketId1 }); + Bucket bucket12({ bucketSpace1, bucketId2 }); Document::SP doc1 = testDocMan.createDocument("content", "id:test:testdoctype1:n=1:1", "testdoctype1"); Document::SP doc2 = testDocMan.createDocument("content", "id:test:testdoctype1:n=1:2", "testdoctype1"); Document::SP doc3 = testDocMan.createDocument("content", "id:test:testdoctype2:n=1:3", "testdoctype2"); @@ -2258,9 +2249,9 @@ TEST_F(ConformanceTest, testBucketSpaces) spi->put(bucket11, Timestamp(5), doc3, context); spi->put(bucket12, Timestamp(6), doc4, context); // Check bucket lists - assertBucketList(*spi, bucketSpace0, partId, { bucketId1 }); - assertBucketList(*spi, bucketSpace1, partId, { bucketId1, bucketId2 }); - assertBucketList(*spi, bucketSpace2, partId, { }); + assertBucketList(*spi, bucketSpace0, { bucketId1 }); + assertBucketList(*spi, bucketSpace1, { bucketId1, bucketId2 }); + assertBucketList(*spi, bucketSpace2, { }); // Check bucket info assertBucketInfo(*spi, bucket01, 2); assertBucketInfo(*spi, bucket11, 1); diff --git a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp index 54464105bb3..b7acde31c4f 100644 --- a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp +++ b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp @@ -295,11 +295,10 @@ BucketContent::eraseEntry(Timestamp t) } } -DummyPersistence::DummyPersistence(const std::shared_ptr<const document::DocumentTypeRepo>& repo, uint16_t partitionCount) +DummyPersistence::DummyPersistence(const std::shared_ptr<const document::DocumentTypeRepo>& repo) : _initialized(false), _repo(repo), - _partitions(partitionCount), - _content(partitionCount), + _content(), _nextIterator(1), _iterators(), _monitor(), @@ -324,33 +323,30 @@ DummyPersistence::parseDocumentSelection(const string& documentSelection, bool a return ret; } -PartitionStateListResult -DummyPersistence::getPartitionStates() const +Result +DummyPersistence::initialize() { + assert(!_initialized); _initialized = true; - LOG(debug, "getPartitionStates()"); - std::lock_guard lock(_monitor); - return PartitionStateListResult(_partitions); + return Result(); } #define DUMMYPERSISTENCE_VERIFY_INITIALIZED \ if (!_initialized) throw vespalib::IllegalStateException( \ - "getPartitionStates() must always be called first in order to " \ + "initialize() must always be called first in order to " \ "trigger lazy initialization.", VESPA_STRLOC) BucketIdListResult -DummyPersistence::listBuckets(BucketSpace bucketSpace, PartitionId id) const +DummyPersistence::listBuckets(BucketSpace bucketSpace) const { DUMMYPERSISTENCE_VERIFY_INITIALIZED; - LOG(debug, "listBuckets(%u)", uint16_t(id)); + LOG(debug, "listBuckets()"); std::lock_guard lock(_monitor); BucketIdListResult::List list; if (bucketSpace == FixedBucketSpaces::default_space()) { - for (PartitionContent::const_iterator it = _content[id].begin(); - it != _content[id].end(); ++it) - { - list.push_back(it->first); + for (const auto &entry : _content) { + list.push_back(entry.first); } } return BucketIdListResult(list); @@ -382,12 +378,8 @@ DummyPersistence::setClusterState(BucketSpace bucketSpace, const ClusterState& c if (bucketSpace == FixedBucketSpaces::default_space()) { _clusterState.reset(new ClusterState(c)); if (!_clusterState->nodeUp()) { - for (uint32_t i=0, n=_content.size(); i<n; ++i) { - for (PartitionContent::iterator it = _content[i].begin(); - it != _content[i].end(); ++it) - { - it->second->setActive(false); - } + for (const auto &entry : _content) { + entry.second->setActive(false); } } } @@ -725,10 +717,10 @@ DummyPersistence::createBucket(const Bucket& b, Context&) LOG(debug, "createBucket(%s)", b.toString().c_str()); assert(b.getBucketSpace() == FixedBucketSpaces::default_space()); std::lock_guard lock(_monitor); - if (_content[b.getPartition()].find(b) == _content[b.getPartition()].end()) { - _content[b.getPartition()][b] = std::make_shared<BucketContent>(); + if (_content.find(b) == _content.end()) { + _content[b] = std::make_shared<BucketContent>(); } else { - assert(!_content[b.getPartition()][b]->_inUse); + assert(!_content[b]->_inUse); LOG(debug, "%s already existed", b.toString().c_str()); } return Result(); @@ -741,10 +733,10 @@ DummyPersistence::deleteBucket(const Bucket& b, Context&) LOG(debug, "deleteBucket(%s)", b.toString().c_str()); assert(b.getBucketSpace() == FixedBucketSpaces::default_space()); std::lock_guard lock(_monitor); - if (_content[b.getPartition()][b].get()) { - assert(!_content[b.getPartition()][b]->_inUse); + if (_content[b].get()) { + assert(!_content[b]->_inUse); } - _content[b.getPartition()].erase(b); + _content.erase(b); return Result(); } @@ -905,8 +897,8 @@ DummyPersistence::dumpBucket(const Bucket& b) const LOG(spam, "dumpBucket(%s)", b.toString().c_str()); assert(b.getBucketSpace() == FixedBucketSpaces::default_space()); std::lock_guard lock(_monitor); - PartitionContent::const_iterator it(_content[b.getPartition()].find(b)); - if (it == _content[b.getPartition()].end()) { + Content::const_iterator it(_content.find(b)); + if (it == _content.end()) { return "DOESN'T EXIST"; } else { vespalib::asciistream ost; @@ -926,8 +918,8 @@ DummyPersistence::isActive(const Bucket& b) const assert(b.getBucketSpace() == FixedBucketSpaces::default_space()); std::lock_guard lock(_monitor); LOG(spam, "isActive(%s)", b.toString().c_str()); - PartitionContent::const_iterator it(_content[b.getPartition()].find(b)); - if (it == _content[b.getPartition()].end()) { + Content::const_iterator it(_content.find(b)); + if (it == _content.end()) { return false; } return it->second->isActive(); @@ -944,8 +936,8 @@ DummyPersistence::acquireBucketWithLock(const Bucket& b, LockMode lock_mode) con assert(b.getBucketSpace() == FixedBucketSpaces::default_space()); std::lock_guard lock(_monitor); DummyPersistence& ncp(const_cast<DummyPersistence&>(*this)); - PartitionContent::iterator it(ncp._content[b.getPartition()].find(b)); - if (it == ncp._content[b.getPartition()].end()) { + Content::iterator it(ncp._content.find(b)); + if (it == ncp._content.end()) { return BucketContentGuard::UP(); } if (lock_mode == LockMode::Exclusive) { diff --git a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h index 5f9d2b6ddc3..5d49127a937 100644 --- a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h +++ b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h @@ -136,12 +136,11 @@ private: class DummyPersistence : public AbstractPersistenceProvider { public: - DummyPersistence(const std::shared_ptr<const document::DocumentTypeRepo>& repo, - uint16_t partitionCount = 1); + DummyPersistence(const std::shared_ptr<const document::DocumentTypeRepo>& repo); ~DummyPersistence(); - PartitionStateListResult getPartitionStates() const override; - BucketIdListResult listBuckets(BucketSpace bucketSpace, PartitionId) const override; + Result initialize() override; + BucketIdListResult listBuckets(BucketSpace bucketSpace) const override; void setModifiedBuckets(const BucketIdListResult::List& result); @@ -201,11 +200,9 @@ private: mutable bool _initialized; std::shared_ptr<const document::DocumentTypeRepo> _repo; - PartitionStateList _partitions; - typedef vespalib::hash_map<Bucket, BucketContent::SP, document::BucketId::hash> - PartitionContent; + using Content = vespalib::hash_map<Bucket, BucketContent::SP, document::BucketId::hash>; - std::vector<PartitionContent> _content; + Content _content; IteratorId _nextIterator; mutable std::map<IteratorId, Iterator::UP> _iterators; mutable std::mutex _monitor; diff --git a/persistence/src/vespa/persistence/spi/CMakeLists.txt b/persistence/src/vespa/persistence/spi/CMakeLists.txt index 771da9a7453..efc744e0792 100644 --- a/persistence/src/vespa/persistence/spi/CMakeLists.txt +++ b/persistence/src/vespa/persistence/spi/CMakeLists.txt @@ -8,7 +8,6 @@ vespa_add_library(persistence_spi OBJECT context.cpp docentry.cpp exceptions.cpp - partitionstate.cpp persistenceprovider.cpp read_consistency.cpp result.cpp diff --git a/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.cpp b/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.cpp index 45c2c7901f9..252edb5dd7f 100644 --- a/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.cpp +++ b/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.cpp @@ -29,12 +29,4 @@ AbstractPersistenceProvider::getModifiedBuckets(BucketSpace) const return BucketIdListResult(list); } -Result -AbstractPersistenceProvider::move(const Bucket& source, PartitionId target, Context& context) -{ - spi::Bucket to(source.getBucket(), spi::PartitionId(target)); - - return join(source, source, to, context); -} - } diff --git a/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.h b/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.h index 813050222a9..016928ab10e 100644 --- a/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.h +++ b/persistence/src/vespa/persistence/spi/abstractpersistenceprovider.h @@ -48,11 +48,6 @@ public: * Default impl empty. */ BucketIdListResult getModifiedBuckets(BucketSpace bucketSpace) const override; - - /** - * Uses join by default. - */ - Result move(const Bucket& source, PartitionId id, Context&) override; }; } diff --git a/persistence/src/vespa/persistence/spi/bucket.cpp b/persistence/src/vespa/persistence/spi/bucket.cpp index ef94519cdb0..f7d4ec021d5 100644 --- a/persistence/src/vespa/persistence/spi/bucket.cpp +++ b/persistence/src/vespa/persistence/spi/bucket.cpp @@ -20,7 +20,6 @@ operator<<(vespalib::asciistream& os, const Bucket& bucket) << vespalib::hex << vespalib::setw(sizeof(document::BucketId::Type)*2) << vespalib::setfill('0') << bucket.getBucketId().getId() << vespalib::dec - << ", partition " << bucket.getPartition() << ")"; } diff --git a/persistence/src/vespa/persistence/spi/bucket.h b/persistence/src/vespa/persistence/spi/bucket.h index b7d04150108..ab47d77bed7 100644 --- a/persistence/src/vespa/persistence/spi/bucket.h +++ b/persistence/src/vespa/persistence/spi/bucket.h @@ -5,11 +5,6 @@ * * \brief Wrapper class for a bucket identifier. * - * We don't want the persistence implementation having to know how to map - * buckets to partitions. Thus we want the service layer to always provide a - * partition identifier together with bucket identifiers. This wrapper class - * exist to ensure we always have partition, and to make interfaces look - * simpler. */ #pragma once @@ -21,23 +16,21 @@ namespace storage::spi { class Bucket { document::Bucket _bucket; - PartitionId _partition; public: - Bucket() noexcept : _bucket(document::BucketSpace::invalid(), document::BucketId(0)), _partition(0) {} - Bucket(const document::Bucket& b, PartitionId p) noexcept - : _bucket(b), _partition(p) {} + Bucket() noexcept : _bucket(document::BucketSpace::invalid(), document::BucketId(0)) {} + explicit Bucket(const document::Bucket& b) noexcept + : _bucket(b) {} const document::Bucket &getBucket() const { return _bucket; } document::BucketId getBucketId() const { return _bucket.getBucketId(); } document::BucketSpace getBucketSpace() const { return _bucket.getBucketSpace(); } - PartitionId getPartition() const { return _partition; } /** Convert easily to a document bucket id to make class easy to use. */ operator document::BucketId() const { return _bucket.getBucketId(); } bool operator==(const Bucket& o) const noexcept { - return (_bucket == o._bucket && _partition == o._partition); + return (_bucket == o._bucket); } vespalib::string toString() const; diff --git a/persistence/src/vespa/persistence/spi/partitionstate.cpp b/persistence/src/vespa/persistence/spi/partitionstate.cpp deleted file mode 100644 index 7cc42742019..00000000000 --- a/persistence/src/vespa/persistence/spi/partitionstate.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#include "partitionstate.h" -#include <vespa/vespalib/util/exceptions.h> -#include <vespa/vespalib/stllike/asciistream.h> - -namespace storage::spi { - -PartitionState::PartitionState() - : _state(UP), - _reason() -{ } - -PartitionState::PartitionState(State s, vespalib::stringref reason) - : _state(s), - _reason(reason) -{ } - -PartitionStateList::PartitionStateList(PartitionId::Type partitionCount) - : _states(partitionCount) -{ } - -PartitionStateList::~PartitionStateList() = default; - -PartitionState& -PartitionStateList::operator[](PartitionId::Type index) -{ - if (index >= _states.size()) { - vespalib::asciistream ost; - ost << "Cannot return disk " << index << " of " << _states.size(); - throw vespalib::IllegalArgumentException(ost.str(), VESPA_STRLOC); - } - return _states[index]; -} - -} diff --git a/persistence/src/vespa/persistence/spi/partitionstate.h b/persistence/src/vespa/persistence/spi/partitionstate.h deleted file mode 100644 index e5ce24abbe6..00000000000 --- a/persistence/src/vespa/persistence/spi/partitionstate.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -/** - * \class storage::spi::PartitionState - * \ingroup spi - * - * \brief Information service layer needs about providers partitions. - * - * In order to be able to utilize all hardware in parallel, the service layer - * is aware of partitions, and what buckets exist in various partitions. - * - * The service layer needs information about how many partitions exist, and if - * any of them are currently unavailable. This object describes what the - * service layer need to know about disks. - */ -#pragma once - -#include <persistence/spi/types.h> - -namespace storage::spi { - -struct PartitionState { - enum State { UP, DOWN }; - - PartitionState(); - PartitionState(State s, vespalib::stringref reason); - - State getState() const { return _state; } - const string& getReason() const { return _reason; } - - bool isUp() const { return (_state == UP); } - -private: - State _state; - string _reason; // If not up, there should be a reason -}; - -class PartitionStateList { - std::vector<PartitionState> _states; - -public: - PartitionStateList(PartitionId::Type partitionCount); - ~PartitionStateList(); - - PartitionState& operator[](PartitionId::Type index); - const PartitionState& operator[](PartitionId::Type index) const - { return const_cast<PartitionStateList&>(*this)[index]; } - - PartitionId size() const { return PartitionId(_states.size()); } -}; - -} diff --git a/persistence/src/vespa/persistence/spi/persistenceprovider.h b/persistence/src/vespa/persistence/spi/persistenceprovider.h index 021ac6338eb..d00862ed5fa 100644 --- a/persistence/src/vespa/persistence/spi/persistenceprovider.h +++ b/persistence/src/vespa/persistence/spi/persistenceprovider.h @@ -6,7 +6,6 @@ #include "context.h" #include "docentry.h" #include "documentselection.h" -#include "partitionstate.h" #include "result.h" #include "selection.h" #include "clusterstate.h" @@ -27,11 +26,6 @@ namespace storage::spi { * how to implement a bucket, but it needs to be able to access a bucket as * a unit. The placement of these units is controlled by the distributors. * <p/> - * A persistence provider may support multiple "partitions". One example of - * a partition is a physical disk, but the exact meaning of "partitions" - * is left to the provider. It must be able to report to the service layer - * though. - * <p/> * All operations return a Result object. The base Result class only * encapsulates potential errors, which can be <i>transient</i>, * <i>permanent</i> or <i>fatal</i>. Transient errors are errors where it's @@ -73,17 +67,9 @@ struct PersistenceProvider virtual Result initialize() = 0; /** - * Returns a list of the partitions available, and which are up and down. - * Currently called once on startup. Partitions are not allowed to change - * runtime. - */ - virtual PartitionStateListResult getPartitionStates() const = 0; - - /** - * Return list of buckets that provider has stored on the given partition. - * Typically called once per partition on startup. + * Return list of buckets that provider has stored. */ - virtual BucketIdListResult listBuckets(BucketSpace bucketSpace, PartitionId) const = 0; + virtual BucketIdListResult listBuckets(BucketSpace bucketSpace) const = 0; /** * Updates the persistence provider with the last cluster state. @@ -388,13 +374,6 @@ struct PersistenceProvider * source1 and source2 should be stored in the target bucket. */ virtual Result join(const Bucket& source1, const Bucket& source2, const Bucket& target, Context&) = 0; - - /** - * Moves a bucket from one partition to another. - * - * @param target The partition to move to. (From partition is in bucket) - */ - virtual Result move(const Bucket&, PartitionId target, Context&) = 0; }; } diff --git a/persistence/src/vespa/persistence/spi/result.h b/persistence/src/vespa/persistence/spi/result.h index 97d1b75a260..35203d41540 100644 --- a/persistence/src/vespa/persistence/spi/result.h +++ b/persistence/src/vespa/persistence/spi/result.h @@ -1,7 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include "partitionstate.h" #include "bucketinfo.h" #include "bucket.h" #include "docentry.h" @@ -314,27 +313,5 @@ private: std::vector<DocEntry::UP> _entries; }; -class PartitionStateListResult : public Result -{ -public: - /** - * Constructor to use for a result where an error has been detected. - */ - PartitionStateListResult(ErrorType error, const vespalib::string& msg) - : Result(error, msg), - _list(0) - { } - - /** - * Constructor to use when the operation was successful. - */ - PartitionStateListResult(PartitionStateList list) : _list(list) { } - - const PartitionStateList & getList() const { return _list; } - -private: - PartitionStateList _list; -}; - } diff --git a/persistence/src/vespa/persistence/spi/test.cpp b/persistence/src/vespa/persistence/spi/test.cpp index b58d527c598..a94cda96f2a 100644 --- a/persistence/src/vespa/persistence/spi/test.cpp +++ b/persistence/src/vespa/persistence/spi/test.cpp @@ -9,14 +9,9 @@ using document::test::makeBucketSpace; namespace storage::spi::test { -Bucket makeSpiBucket(BucketId bucketId, PartitionId partitionId) -{ - return Bucket(document::Bucket(makeBucketSpace(), bucketId), partitionId); -} - Bucket makeSpiBucket(BucketId bucketId) { - return makeSpiBucket(bucketId, PartitionId(0)); + return Bucket(document::Bucket(makeBucketSpace(), bucketId)); } } diff --git a/persistence/src/vespa/persistence/spi/test.h b/persistence/src/vespa/persistence/spi/test.h index 445cfc91213..5cc92ee4397 100644 --- a/persistence/src/vespa/persistence/spi/test.h +++ b/persistence/src/vespa/persistence/spi/test.h @@ -8,7 +8,6 @@ namespace storage::spi::test { // Helper functions used by unit tests -Bucket makeSpiBucket(document::BucketId bucketId, PartitionId partitionId); Bucket makeSpiBucket(document::BucketId bucketId); } |