summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--persistence/src/vespa/persistence/spi/bucketinfo.h2
-rw-r--r--persistence/src/vespa/persistence/spi/docentry.h2
-rw-r--r--persistence/src/vespa/persistence/spi/selection.h2
-rw-r--r--persistencetypes/CMakeLists.txt4
-rw-r--r--persistencetypes/src/vespa/persistence/.gitignore (renamed from persistencetypes/src/persistence/.gitignore)0
-rw-r--r--persistencetypes/src/vespa/persistence/CMakeLists.txt (renamed from persistencetypes/src/persistence/CMakeLists.txt)0
-rw-r--r--persistencetypes/src/vespa/persistence/spi/.gitignore (renamed from persistencetypes/src/persistence/spi/.gitignore)0
-rw-r--r--persistencetypes/src/vespa/persistence/spi/CMakeLists.txt (renamed from persistencetypes/src/persistence/spi/CMakeLists.txt)0
-rw-r--r--persistencetypes/src/vespa/persistence/spi/types.cpp (renamed from persistencetypes/src/persistence/spi/types.cpp)0
-rw-r--r--persistencetypes/src/vespa/persistence/spi/types.h (renamed from persistencetypes/src/persistence/spi/types.h)0
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp2
-rw-r--r--searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp4
-rw-r--r--searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp22
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/remove_batch_entry.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp18
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoresaver.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/i_store.h15
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.h9
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.h44
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.h12
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/docstorevalidator.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentbucketmover.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/feedhandler.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/document.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h13
-rw-r--r--searchlib/src/vespa/searchlib/aggregation/grouping.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/common/idocumentmetastore.h11
-rw-r--r--storage/src/tests/common/teststorageapp.h2
-rw-r--r--storage/src/vespa/storage/persistence/bucketprocessor.h2
50 files changed, 107 insertions, 138 deletions
diff --git a/persistence/src/vespa/persistence/spi/bucketinfo.h b/persistence/src/vespa/persistence/spi/bucketinfo.h
index 5759ceb2518..e6f16f38285 100644
--- a/persistence/src/vespa/persistence/spi/bucketinfo.h
+++ b/persistence/src/vespa/persistence/spi/bucketinfo.h
@@ -6,7 +6,7 @@
#pragma once
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
namespace vespalib { class asciistream; }
diff --git a/persistence/src/vespa/persistence/spi/docentry.h b/persistence/src/vespa/persistence/spi/docentry.h
index 9ad06b41e90..11a7a313802 100644
--- a/persistence/src/vespa/persistence/spi/docentry.h
+++ b/persistence/src/vespa/persistence/spi/docentry.h
@@ -13,7 +13,7 @@
#pragma once
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
#include <vespa/document/base/globalid.h>
namespace storage::spi {
diff --git a/persistence/src/vespa/persistence/spi/selection.h b/persistence/src/vespa/persistence/spi/selection.h
index d4c7df8972f..4f6d9f9a61f 100644
--- a/persistence/src/vespa/persistence/spi/selection.h
+++ b/persistence/src/vespa/persistence/spi/selection.h
@@ -9,7 +9,7 @@
#pragma once
#include "documentselection.h"
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
namespace storage::spi {
diff --git a/persistencetypes/CMakeLists.txt b/persistencetypes/CMakeLists.txt
index 80ecf7a845b..2403c1d9406 100644
--- a/persistencetypes/CMakeLists.txt
+++ b/persistencetypes/CMakeLists.txt
@@ -5,6 +5,6 @@ vespa_define_module(
document
LIBS
- src/persistence
- src/persistence/spi
+ src/vespa/persistence
+ src/vespa/persistence/spi
)
diff --git a/persistencetypes/src/persistence/.gitignore b/persistencetypes/src/vespa/persistence/.gitignore
index 444f5c50077..444f5c50077 100644
--- a/persistencetypes/src/persistence/.gitignore
+++ b/persistencetypes/src/vespa/persistence/.gitignore
diff --git a/persistencetypes/src/persistence/CMakeLists.txt b/persistencetypes/src/vespa/persistence/CMakeLists.txt
index 2ea62581c4e..2ea62581c4e 100644
--- a/persistencetypes/src/persistence/CMakeLists.txt
+++ b/persistencetypes/src/vespa/persistence/CMakeLists.txt
diff --git a/persistencetypes/src/persistence/spi/.gitignore b/persistencetypes/src/vespa/persistence/spi/.gitignore
index 7e7c0fe7fae..7e7c0fe7fae 100644
--- a/persistencetypes/src/persistence/spi/.gitignore
+++ b/persistencetypes/src/vespa/persistence/spi/.gitignore
diff --git a/persistencetypes/src/persistence/spi/CMakeLists.txt b/persistencetypes/src/vespa/persistence/spi/CMakeLists.txt
index 5a5f335ef40..5a5f335ef40 100644
--- a/persistencetypes/src/persistence/spi/CMakeLists.txt
+++ b/persistencetypes/src/vespa/persistence/spi/CMakeLists.txt
diff --git a/persistencetypes/src/persistence/spi/types.cpp b/persistencetypes/src/vespa/persistence/spi/types.cpp
index 260355213d9..260355213d9 100644
--- a/persistencetypes/src/persistence/spi/types.cpp
+++ b/persistencetypes/src/vespa/persistence/spi/types.cpp
diff --git a/persistencetypes/src/persistence/spi/types.h b/persistencetypes/src/vespa/persistence/spi/types.h
index a75b977c14a..a75b977c14a 100644
--- a/persistencetypes/src/persistence/spi/types.h
+++ b/persistencetypes/src/vespa/persistence/spi/types.h
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp
index 57989688a4f..9c68d7d5974 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_common.cpp
@@ -106,7 +106,7 @@ MyHandler::createMoveOperation(const search::DocumentMetaData &document, uint32_
assert(document.lid > moveToLid);
_moveFromLid = document.lid;
const auto & entry = _docs[document.lid];
- auto op = std::make_unique<MoveOperation>(entry.first.bucketId, entry.first.timestamp, entry.second,
+ auto op = std::make_unique<MoveOperation>(entry.first.bucketId, storage::spi::Timestamp(entry.first.timestamp), entry.second,
DbDocumentId(document.lid), 0);
op->setTargetLid(moveToLid);
return op;
diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
index 0414990d74e..73311c110a9 100644
--- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
@@ -102,7 +102,7 @@ createBucketDB()
void
assertPut(const BucketId &bucketId,
- const Timestamp &timestamp,
+ uint64_t timestamp,
uint32_t lid,
const GlobalId &gid,
DocumentMetaStore &dms)
diff --git a/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp b/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp
index a30408a9301..62e8a3e553a 100644
--- a/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp
@@ -67,11 +67,11 @@ public:
return Result();
}
- Result put(const GlobalId &, const BucketId &, const Timestamp &, uint32_t, DocId, uint64_t) override {
+ Result put(const GlobalId &, const BucketId &, Timestamp , uint32_t, DocId, uint64_t) override {
return Result();
}
- bool updateMetaData(DocId, const BucketId &, const Timestamp &) override {
+ bool updateMetaData(DocId, const BucketId &, Timestamp ) override {
return true;
}
diff --git a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
index 039524a237c..5c4d7aca41d 100644
--- a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
+++ b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
@@ -14,7 +14,6 @@
#include <vespa/searchcore/proton/feedoperation/splitbucketoperation.h>
#include <vespa/searchcore/proton/feedoperation/updateoperation.h>
#include <vespa/searchlib/query/base.h>
-#include <persistence/spi/types.h>
#include <vespa/document/base/documentid.h>
#include <vespa/document/datatype/datatype.h>
#include <vespa/document/fieldvalue/document.h>
@@ -42,7 +41,6 @@ using document::config_builder::DocumenttypesConfigBuilderHelper;
using document::config_builder::Struct;
using document::config_builder::Map;
using search::DocumentIdT;
-using storage::spi::Timestamp;
using namespace proton;
namespace {
@@ -59,6 +57,8 @@ const vespalib::string type_name = "test";
const vespalib::string header_name = type_name + ".header";
const vespalib::string body_name = type_name + ".body";
+const DocumentOperation::Timestamp TS_10(10);
+
const document::DocumentId docId("id::test::1");
BucketId toBucket(const GlobalId &gid)
@@ -85,7 +85,7 @@ uint32_t getDocIdSize(const DocumentId &doc_id)
void assertDocumentOperation(DocumentOperation &op, BucketId expBucket, uint32_t expDocSize)
{
EXPECT_EQUAL(expBucket, op.getBucketId());
- EXPECT_EQUAL(10u, op.getTimestamp().getValue());
+ EXPECT_EQUAL(10u, op.getTimestamp());
EXPECT_EQUAL(expDocSize, op.getSerializedDocSize());
EXPECT_EQUAL(1u, op.getSubDbId());
EXPECT_EQUAL(2u, op.getLid());
@@ -138,7 +138,7 @@ TEST("require that toString() on derived classes are meaningful")
BucketId bucket_id1(42);
BucketId bucket_id2(43);
BucketId bucket_id3(44);
- Timestamp timestamp(10);
+ DocumentOperation::Timestamp timestamp(10);
Document::SP doc(new Document);
DbDocumentId db_doc_id;
uint32_t sub_db_id = 1;
@@ -247,7 +247,7 @@ TEST_F("require that we can serialize and deserialize update operations", Fixtur
BucketId bucket(toBucket(docId.getGlobalId()));
auto upd(f.makeUpdate());
{
- UpdateOperation op(bucket, Timestamp(10), upd);
+ UpdateOperation op(bucket, 10, upd);
op.serialize(stream);
}
{
@@ -255,7 +255,7 @@ TEST_F("require that we can serialize and deserialize update operations", Fixtur
op.deserialize(stream, *f._repo);
EXPECT_EQUAL(*upd, *op.getUpdate());
EXPECT_EQUAL(bucket, op.getBucketId());
- EXPECT_EQUAL(10u, op.getTimestamp().getValue());
+ EXPECT_EQUAL(10u, op.getTimestamp());
}
}
@@ -267,7 +267,7 @@ TEST_F("require that we can serialize and deserialize put operations", Fixture)
uint32_t expSerializedDocSize = getDocSize(*doc);
EXPECT_NOT_EQUAL(0u, expSerializedDocSize);
{
- PutOperation op(bucket, Timestamp(10), doc);
+ PutOperation op(bucket, 10, doc);
op.setDbDocumentId({1, 2});
op.setPrevDbDocumentId({3, 4});
EXPECT_EQUAL(0u, op.getSerializedDocSize());
@@ -290,7 +290,7 @@ TEST_F("require that we can serialize and deserialize move operations", Fixture)
uint32_t expSerializedDocSize = getDocSize(*doc);
EXPECT_NOT_EQUAL(0u, expSerializedDocSize);
{
- MoveOperation op(bucket, Timestamp(10), doc, {3, 4}, 1);
+ MoveOperation op(bucket, TS_10 , doc, {3, 4}, 1);
op.setTargetLid(2);
EXPECT_EQUAL(0u, op.getSerializedDocSize());
op.serialize(stream);
@@ -311,7 +311,7 @@ TEST_F("require that we can serialize and deserialize remove operations", Fixtur
uint32_t expSerializedDocSize = getDocIdSize(docId);
EXPECT_NOT_EQUAL(0u, expSerializedDocSize);
{
- RemoveOperationWithDocId op(bucket, Timestamp(10), docId);
+ RemoveOperationWithDocId op(bucket, TS_10 , docId);
op.setDbDocumentId({1, 2});
op.setPrevDbDocumentId({3, 4});
EXPECT_EQUAL(0u, op.getSerializedDocSize());
@@ -335,7 +335,7 @@ TEST_F("require that we can serialize and deserialize remove by gid operations",
vespalib::string expDocType = "testdoc_type";
EXPECT_NOT_EQUAL(0u, expSerializedDocSize);
{
- RemoveOperationWithGid op(bucket, Timestamp(10), gid, expDocType);
+ RemoveOperationWithGid op(bucket, TS_10 , gid, expDocType);
op.setPrevDbDocumentId({3, 4});
EXPECT_EQUAL(0u, op.getSerializedDocSize());
op.serialize(stream);
@@ -347,7 +347,7 @@ TEST_F("require that we can serialize and deserialize remove by gid operations",
EXPECT_EQUAL(gid, op.getGlobalId());
EXPECT_EQUAL(expDocType, op.getDocType());
EXPECT_EQUAL(bucket, op.getBucketId());
- EXPECT_EQUAL(10u, op.getTimestamp().getValue());
+ EXPECT_EQUAL(10u, op.getTimestamp());
EXPECT_EQUAL(expSerializedDocSize, op.getSerializedDocSize());
EXPECT_FALSE( op.getValidDbdId());
EXPECT_EQUAL(3u, op.getPrevSubDbId());
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/remove_batch_entry.h b/searchcore/src/vespa/searchcore/proton/bucketdb/remove_batch_entry.h
index 1ab1adb1add..bc6d0890906 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/remove_batch_entry.h
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/remove_batch_entry.h
@@ -4,7 +4,7 @@
#include <vespa/document/base/globalid.h>
#include <vespa/document/bucket/bucketid.h>
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
namespace proton::bucketdb {
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
index 15de7b9b1d2..46b5f051422 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
@@ -486,15 +486,11 @@ DocumentMetaStore::inspect(const GlobalId &gid, uint64_t prepare_serial_num)
}
DocumentMetaStore::Result
-DocumentMetaStore::put(const GlobalId &gid,
- const BucketId &bucketId,
- const Timestamp &timestamp,
- uint32_t docSize,
- DocId lid,
- uint64_t prepare_serial_num)
+DocumentMetaStore::put(const GlobalId &gid, const BucketId &bucketId, Timestamp timestamp,
+ uint32_t docSize, DocId lid, uint64_t prepare_serial_num)
{
Result res;
- RawDocumentMetaData metaData(gid, bucketId, timestamp, docSize);
+ RawDocumentMetaData metaData(gid, bucketId, storage::spi::Timestamp(timestamp), docSize);
KeyComp comp(metaData, get_unbound_meta_data_view());
auto find_key = GidToLidMapKey::make_find_key(gid);
auto& itr = _gid_to_lid_map_write_itr;
@@ -545,9 +541,7 @@ DocumentMetaStore::put(const GlobalId &gid,
}
bool
-DocumentMetaStore::updateMetaData(DocId lid,
- const BucketId &bucketId,
- const Timestamp &timestamp)
+DocumentMetaStore::updateMetaData(DocId lid, const BucketId &bucketId, Timestamp timestamp)
{
if (!validLid(lid)) {
return false;
@@ -558,12 +552,12 @@ DocumentMetaStore::updateMetaData(DocId lid,
metaData.getTimestamp(),
metaData.getDocSize(),
bucketId.stripUnused(),
- timestamp,
+ storage::spi::Timestamp(timestamp),
metaData.getDocSize(),
_subDbType);
metaData.setBucketId(bucketId);
std::atomic_thread_fence(std::memory_order_release);
- metaData.setTimestamp(timestamp);
+ metaData.setTimestamp(storage::spi::Timestamp(timestamp));
return true;
}
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h
index 0a5fff24a0e..adb2778c2d2 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h
@@ -146,7 +146,7 @@ public:
static constexpr size_t minHeaderLen = 0x1000;
static constexpr size_t entrySize =
sizeof(uint32_t) + GlobalId::LENGTH + sizeof(uint8_t) +
- sizeof(Timestamp::Type);
+ sizeof(Timestamp);
DocumentMetaStore(BucketDBOwnerSP bucketDB,
const vespalib::string & name=getFixedName(),
@@ -167,9 +167,9 @@ public:
* map is then re-built the same way it was originally where add()
* was used to create the <lid, gid> pairs.
**/
- Result put(const GlobalId &gid, const BucketId &bucketId,
- const Timestamp &timestamp, uint32_t docSize, DocId lid, uint64_t prepare_serial_num) override;
- bool updateMetaData(DocId lid, const BucketId &bucketId, const Timestamp &timestamp) override;
+ Result put(const GlobalId &gid, const BucketId &bucketId, Timestamp timestamp,
+ uint32_t docSize, DocId lid, uint64_t prepare_serial_num) override;
+ bool updateMetaData(DocId lid, const BucketId &bucketId, Timestamp timestamp) override;
bool remove(DocId lid, uint64_t prepare_serial_num) override;
BucketId getBucketOf(const vespalib::GenerationHandler::Guard & guard, uint32_t lid) const override;
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoresaver.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoresaver.cpp
index e4ad9cf8ac2..b844d5400a9 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoresaver.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoresaver.cpp
@@ -44,7 +44,7 @@ public:
uint8_t bucketUsedBits = metaData.getBucketUsedBits();
assert(BucketId::validUsedBits(bucketUsedBits));
assert((bucketUsedBits >> BucketId::CountBits) == 0);
- Timestamp::Type timestamp = metaData.getTimestamp();
+ Timestamp timestamp = metaData.getTimestamp();
search::BufferWriter &datWriter(_datWriter);
datWriter.write(&lid, sizeof(lid));
datWriter.write(gid.get(), GlobalId::LENGTH);
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_store.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_store.h
index 49849fea2c1..58f668ecc62 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_store.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_store.h
@@ -5,7 +5,6 @@
#include "raw_document_meta_data.h"
#include <vespa/document/base/globalid.h>
#include <vespa/document/bucket/bucketid.h>
-#include <persistence/spi/types.h>
namespace proton::documentmetastore {
@@ -16,10 +15,10 @@ namespace proton::documentmetastore {
**/
struct IStore
{
- typedef uint32_t DocId;
- typedef document::GlobalId GlobalId;
- typedef document::BucketId BucketId;
- typedef storage::spi::Timestamp Timestamp;
+ using DocId = uint32_t;
+ using GlobalId = document::GlobalId;
+ using BucketId = document::BucketId;
+ using Timestamp = uint64_t;
/**
* Result after lookup in the store.
@@ -49,7 +48,7 @@ struct IStore
}
};
- virtual ~IStore() {}
+ virtual ~IStore() = default;
/**
* Inspect the meta data associated with the given gid.
@@ -71,7 +70,7 @@ struct IStore
**/
virtual Result put(const GlobalId &gid,
const BucketId &bucketId,
- const Timestamp &timestamp,
+ Timestamp timestamp,
uint32_t docSize,
DocId lid,
uint64_t prepare_serial_num) = 0;
@@ -83,7 +82,7 @@ struct IStore
*/
virtual bool updateMetaData(DocId lid,
const BucketId &bucketId,
- const Timestamp &timestamp) = 0;
+ Timestamp timestamp) = 0;
/**
* Removes the <lid, meta data> pair with the given lid from this
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h
index b5e512fcd9e..1fbd9b0ac62 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h
@@ -4,7 +4,7 @@
#include <vespa/document/base/globalid.h>
#include <vespa/document/bucket/bucketid.h>
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
#include <algorithm>
#include <atomic>
#include <cassert>
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.h
index da4e2ff40ea..c07b1ce2c8f 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.h
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.h
@@ -13,12 +13,11 @@ class CreateBucketOperation : public FeedOperation
public:
CreateBucketOperation();
CreateBucketOperation(const document::BucketId &bucketId);
- virtual ~CreateBucketOperation() {}
+ ~CreateBucketOperation() override = default;
const document::BucketId &getBucketId() const { return _bucketId; }
- virtual void serialize(vespalib::nbostream &os) const override;
- virtual void deserialize(vespalib::nbostream &is,
- const document::DocumentTypeRepo &repo) override;
- virtual vespalib::string toString() const override;
+ void serialize(vespalib::nbostream &os) const override;
+ void deserialize(vespalib::nbostream &is, const document::DocumentTypeRepo &repo) override;
+ vespalib::string toString() const override;
};
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.h
index e22e47c9932..cce84a63dfa 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.h
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.h
@@ -13,7 +13,7 @@ class DeleteBucketOperation : public RemoveDocumentsOperation
public:
DeleteBucketOperation();
DeleteBucketOperation(const document::BucketId &bucketId);
- virtual ~DeleteBucketOperation() {}
+ ~DeleteBucketOperation() override = default;
const document::BucketId &getBucketId() const { return _bucketId; }
virtual void serialize(vespalib::nbostream &os) const override;
virtual void deserialize(vespalib::nbostream &is,
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp
index 6c65d7f22b8..a3b8692c6d5 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp
@@ -62,10 +62,10 @@ DocumentOperation::assertValidBucketId(const document::GlobalId &gid) const
vespalib::string DocumentOperation::docArgsToString() const {
return make_string("%s, timestamp=%" PRIu64 ", dbdId=(%s), prevDbdId=(%s), "
"prevMarkedAsRemoved=%s, prevTimestamp=%" PRIu64 ", serialNum=%" PRIu64,
- _bucketId.toString().c_str(), _timestamp.getValue(),
+ _bucketId.toString().c_str(), _timestamp,
_dbdId.toString().c_str(), _prevDbdId.toString().c_str(),
(_prevMarkedAsRemoved ? "true" : "false"),
- _prevTimestamp.getValue(), getSerialNum());
+ _prevTimestamp, getSerialNum());
}
void
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.h
index d5086e9394b..d2f60208474 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.h
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.h
@@ -4,35 +4,17 @@
#include "feedoperation.h"
#include <vespa/searchcore/proton/common/dbdocumentid.h>
#include <vespa/document/bucket/bucketid.h>
-#include <persistence/spi/types.h>
-#include <vespa/searchlib/query/base.h>
+#include <vespa/persistence/spi/types.h>
namespace proton {
class DocumentOperation : public FeedOperation
{
-protected:
- document::BucketId _bucketId;
- storage::spi::Timestamp _timestamp;
- DbDocumentId _dbdId;
- DbDocumentId _prevDbdId;
- bool _prevMarkedAsRemoved;
- storage::spi::Timestamp _prevTimestamp;
- mutable uint32_t _serializedDocSize; // Set by serialize()/deserialize()
- uint64_t _prepare_serial_num;
-
- DocumentOperation(Type type) noexcept;
-
- DocumentOperation(Type type, document::BucketId bucketId, storage::spi::Timestamp timestamp) noexcept;
-
- void assertValidBucketId(const document::DocumentId &docId) const;
- void assertValidBucketId(const document::GlobalId &docId) const;
- vespalib::string docArgsToString() const;
-
public:
+ using Timestamp = uint64_t;
~DocumentOperation() override;
const document::BucketId &getBucketId() const { return _bucketId; }
- storage::spi::Timestamp getTimestamp() const { return _timestamp; }
+ Timestamp getTimestamp() const { return _timestamp; }
search::DocumentIdT getLid() const { return _dbdId.getLid(); }
search::DocumentIdT getPrevLid() const { return _prevDbdId.getLid(); }
@@ -77,8 +59,8 @@ public:
getLid() != getPrevLid();
}
- storage::spi::Timestamp getPrevTimestamp() const { return _prevTimestamp; }
- void setPrevTimestamp(storage::spi::Timestamp prevTimestamp) { _prevTimestamp = prevTimestamp; }
+ Timestamp getPrevTimestamp() const { return _prevTimestamp; }
+ void setPrevTimestamp(Timestamp prevTimestamp) { _prevTimestamp = prevTimestamp; }
void serialize(vespalib::nbostream &os) const override;
void deserialize(vespalib::nbostream &is, const document::DocumentTypeRepo &repo) override;
@@ -89,6 +71,22 @@ public:
// Provided as a hook for tests.
void serializeDocumentOperationOnly(vespalib::nbostream &os) const;
+protected:
+ document::BucketId _bucketId;
+ Timestamp _timestamp;
+ DbDocumentId _dbdId;
+ DbDocumentId _prevDbdId;
+ bool _prevMarkedAsRemoved;
+ Timestamp _prevTimestamp;
+ mutable uint32_t _serializedDocSize; // Set by serialize()/deserialize()
+ uint64_t _prepare_serial_num;
+
+ DocumentOperation(Type type) noexcept;
+ DocumentOperation(Type type, document::BucketId bucketId, uint64_t timestamp) noexcept;
+
+ void assertValidBucketId(const document::DocumentId &docId) const;
+ void assertValidBucketId(const document::GlobalId &docId) const;
+ vespalib::string docArgsToString() const;
};
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp
index 4f8511fe2cf..c0cd12738fe 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp
@@ -19,7 +19,7 @@ MoveOperation::MoveOperation()
MoveOperation::MoveOperation(const BucketId &bucketId,
- const Timestamp &timestamp,
+ Timestamp timestamp,
const Document::SP &doc,
DbDocumentId sourceDbdId,
uint32_t targetSubDbId)
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.h
index 0304bf9da96..3553820b21a 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.h
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.h
@@ -15,7 +15,7 @@ public:
MoveOperation();
MoveOperation(const document::BucketId &bucketId,
- const storage::spi::Timestamp &timestamp,
+ Timestamp timestamp,
const DocumentSP &doc,
DbDocumentId sourceDbdId,
uint32_t targetSubDbId);
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp
index 262f882bf3d..3324a27009b 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp
@@ -10,7 +10,6 @@ LOG_SETUP(".proton.feedoperation.pruneremoveddocumentsoperation");
using document::DocumentTypeRepo;
using search::DocumentIdT;
-using storage::spi::Timestamp;
using vespalib::make_string;
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h
index 64e553a8e1e..ba67dca5e72 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h
@@ -2,7 +2,6 @@
#pragma once
#include "removedocumentsoperation.h"
-#include <persistence/spi/types.h>
#include <vespa/searchlib/query/base.h>
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp
index 19e85df61e9..af4df0bea36 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp
@@ -6,7 +6,6 @@
using document::BucketId;
using document::Document;
using document::DocumentTypeRepo;
-using storage::spi::Timestamp;
using vespalib::make_string;
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.h
index effe57636dd..623600194e4 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.h
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.h
@@ -12,9 +12,7 @@ class PutOperation : public DocumentOperation
public:
PutOperation();
- PutOperation(document::BucketId bucketId,
- storage::spi::Timestamp timestamp,
- DocumentSP doc);
+ PutOperation(document::BucketId bucketId, Timestamp timestamp, DocumentSP doc);
~PutOperation() override;
const DocumentSP &getDocument() const { return _doc; }
void assertValid() const;
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp
index 06ab745ce3e..0b02d366783 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp
@@ -7,7 +7,6 @@ using document::BucketId;
using document::DocumentId;
using document::GlobalId;
using document::DocumentTypeRepo;
-using storage::spi::Timestamp;
using vespalib::make_string;
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.h
index 6c94fd16dc5..5613d6c6cbd 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.h
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.h
@@ -9,7 +9,7 @@ namespace proton {
class RemoveOperation : public DocumentOperation {
protected:
explicit RemoveOperation(Type type) : DocumentOperation(type) {}
- RemoveOperation(Type type, document::BucketId bucketId, storage::spi::Timestamp timestamp)
+ RemoveOperation(Type type, document::BucketId bucketId, Timestamp timestamp)
: DocumentOperation(type, bucketId, timestamp)
{}
public:
@@ -23,9 +23,7 @@ class RemoveOperationWithDocId : public RemoveOperation {
public:
RemoveOperationWithDocId();
- RemoveOperationWithDocId(document::BucketId bucketId,
- storage::spi::Timestamp timestamp,
- const document::DocumentId &docId);
+ RemoveOperationWithDocId(document::BucketId bucketId, Timestamp timestamp, const document::DocumentId &docId);
~RemoveOperationWithDocId() override;
const document::DocumentId &getDocumentId() const { return _docId; }
const document::GlobalId & getGlobalId() const override { return _docId.getGlobalId(); }
@@ -43,10 +41,8 @@ class RemoveOperationWithGid : public RemoveOperation {
public:
RemoveOperationWithGid();
- RemoveOperationWithGid(document::BucketId bucketId,
- storage::spi::Timestamp timestamp,
- const document::GlobalId & gid,
- vespalib::stringref docType);
+ RemoveOperationWithGid(document::BucketId bucketId, Timestamp timestamp,
+ const document::GlobalId & gid, vespalib::stringref docType);
~RemoveOperationWithGid() override;
const document::GlobalId & getGlobalId() const override { return _gid; }
void serialize(vespalib::nbostream &os) const override;
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp
index c7c28a5bdc9..fe95df9c1c2 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp
@@ -12,7 +12,6 @@ using document::BucketId;
using document::DocumentType;
using document::DocumentTypeRepo;
using document::DocumentUpdate;
-using storage::spi::Timestamp;
using vespalib::make_string;
namespace proton {
@@ -30,14 +29,14 @@ UpdateOperation::UpdateOperation(Type type)
UpdateOperation::UpdateOperation(Type type, const BucketId &bucketId,
- const Timestamp &timestamp, DocumentUpdate::SP upd)
+ Timestamp timestamp, DocumentUpdate::SP upd)
: DocumentOperation(type, bucketId, timestamp),
_upd(std::move(upd))
{
}
-UpdateOperation::UpdateOperation(const BucketId &bucketId, const Timestamp &timestamp, DocumentUpdate::SP upd)
+UpdateOperation::UpdateOperation(const BucketId &bucketId, Timestamp timestamp, DocumentUpdate::SP upd)
: UpdateOperation(FeedOperation::UPDATE, bucketId, timestamp, std::move(upd))
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.h
index 64fc6fb0fcd..3f835429fcf 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.h
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.h
@@ -16,16 +16,14 @@ private:
using DocumentUpdateSP = std::shared_ptr<document::DocumentUpdate>;
DocumentUpdateSP _upd;
UpdateOperation(Type type, const document::BucketId &bucketId,
- const storage::spi::Timestamp &timestamp,
- DocumentUpdateSP upd);
+ Timestamp timestamp, DocumentUpdateSP upd);
void serializeUpdate(vespalib::nbostream &os) const;
void deserializeUpdate(vespalib::nbostream && is, const document::DocumentTypeRepo &repo);
public:
UpdateOperation();
UpdateOperation(Type type);
UpdateOperation(const document::BucketId &bucketId,
- const storage::spi::Timestamp &timestamp,
- DocumentUpdateSP upd);
+ Timestamp timestamp, DocumentUpdateSP upd);
~UpdateOperation() override;
const DocumentUpdateSP &getUpdate() const { return _upd; }
void serialize(vespalib::nbostream &os) const override;
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp
index 278b0c68dab..de45770ce3c 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp
@@ -214,7 +214,7 @@ public:
if (doc && _fields) {
document::FieldSet::stripFields(*doc, *_fields);
}
- _list.push_back(createDocEntry(meta.timestamp, meta.removed, std::move(doc), _defaultSerializedSize));
+ _list.push_back(createDocEntry(storage::spi::Timestamp(meta.timestamp), meta.removed, std::move(doc), _defaultSerializedSize));
}
}
@@ -269,7 +269,7 @@ DocumentIterator::fetchCompleteSource(const IDocumentRetriever & source, Iterate
for (uint32_t lid : lidsToFetch) {
const search::DocumentMetaData & meta = metaData[lidIndexMap[lid]];
assert(lid == meta.lid);
- list.push_back(createDocEntry(meta.timestamp, meta.removed));
+ list.push_back(createDocEntry(storage::spi::Timestamp(meta.timestamp), meta.removed));
}
} else {
MatchVisitor visitor(matcher, metaData, lidIndexMap, _fields.get(), list, _defaultSerializedSize);
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.h b/searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.h
index cb72737479e..529b7759530 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.h
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.h
@@ -2,7 +2,7 @@
#pragma once
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
#include <vespa/persistence/spi/bucket.h>
#include <vespa/persistence/spi/read_consistency.h>
#include <vespa/searchlib/common/idocumentmetastore.h>
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp
index 0621612aca7..7e9f763a758 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp
@@ -489,18 +489,19 @@ PersistenceEngine::get(const Bucket& b, const document::FieldSet& fields, const
for (size_t i = 0; i < retrievers->size(); ++i) {
IDocumentRetriever &retriever = *(*retrievers)[i];
search::DocumentMetaData meta = retriever.getDocumentMetaData(did);
- if (meta.timestamp != 0 && meta.bucketId == b.getBucketId()) {
+ storage::spi::Timestamp timestamp(meta.timestamp);
+ if (timestamp != 0 && meta.bucketId == b.getBucketId()) {
if (meta.removed) {
- return GetResult::make_for_tombstone(meta.timestamp);
+ return GetResult::make_for_tombstone(timestamp);
}
if (document::FieldSet::Type::NONE == fields.getType()) {
- return GetResult::make_for_metadata_only(meta.timestamp);
+ return GetResult::make_for_metadata_only(timestamp);
}
document::Document::UP doc = retriever.getPartialDocument(meta.lid, did, fields);
if (!doc || doc->getId().getGlobalId() != meta.gid) {
return GetResult();
}
- return GetResult(std::move(doc), meta.timestamp);
+ return GetResult(std::move(doc), timestamp);
}
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
index 297a9b9254f..7123edd96ff 100644
--- a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
@@ -87,7 +87,7 @@ CombiningFeedView::findPrevDbdId(const document::GlobalId &gid,
if (inspectRes._found) {
op.setPrevDbDocumentId(DbDocumentId(subDbId, inspectRes._lid));
op.setPrevMarkedAsRemoved(subDbId == getRemFeedViewId());
- op.setPrevTimestamp(inspectRes._timestamp);
+ op.setPrevTimestamp(storage::spi::Timestamp(inspectRes._timestamp));
break;
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/docstorevalidator.cpp b/searchcore/src/vespa/searchcore/proton/server/docstorevalidator.cpp
index b1ab67ab5a4..c14863137e4 100644
--- a/searchcore/src/vespa/searchcore/proton/server/docstorevalidator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/docstorevalidator.cpp
@@ -129,7 +129,7 @@ DocStoreValidator::performRemoves(FeedHandler & feedHandler, const search::IDocu
document::Document::UP document = store.read(lid, repo);
assert(document);
LOG(info, "Removing document with id %s and lid %u with gid %s in bucket %s", document->getId().toString().c_str(), lid, metaData.gid.toString().c_str(), metaData.bucketId.toString().c_str());
- auto remove = std::make_unique<RemoveOperationWithGid>(metaData.bucketId, metaData.timestamp, gid, document->getType().getName());
+ auto remove = std::make_unique<RemoveOperationWithGid>(metaData.bucketId, storage::spi::Timestamp(metaData.timestamp), gid, document->getType().getName());
feedHandler.performOperation(FeedToken(), std::move(remove));
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentbucketmover.h b/searchcore/src/vespa/searchcore/proton/server/documentbucketmover.h
index f908d019ca7..4dec53bc66b 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentbucketmover.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentbucketmover.h
@@ -4,7 +4,7 @@
#include <vespa/document/bucket/bucketid.h>
#include <vespa/document/base/globalid.h>
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
#include <atomic>
namespace vespalib { class IDestructorCallback; }
diff --git a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
index 402de8ce7ea..9ac5b02c61e 100644
--- a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
@@ -34,7 +34,6 @@ using document::DocumentTypeRepo;
using storage::spi::RemoveResult;
using storage::spi::Result;
using storage::spi::Timestamp;
-using storage::spi::Timestamp;
using storage::spi::UpdateResult;
using vespalib::Executor;
using vespalib::IllegalStateException;
@@ -208,7 +207,7 @@ FeedHandler::performInternalUpdate(FeedToken token, UpdateOperation &op)
{
appendOperation(op, token);
if (token) {
- token->setResult(make_unique<UpdateResult>(op.getPrevTimestamp()), true);
+ token->setResult(make_unique<UpdateResult>(Timestamp(op.getPrevTimestamp())), true);
}
_activeFeedView->handleUpdate(std::move(token), op);
}
@@ -225,7 +224,7 @@ FeedHandler::createNonExistingDocument(FeedToken token, const UpdateOperation &o
_activeFeedView->preparePut(putOp);
appendOperation(putOp, token);
if (token) {
- token->setResult(make_unique<UpdateResult>(putOp.getTimestamp()), true);
+ token->setResult(make_unique<UpdateResult>(Timestamp(putOp.getTimestamp())), true);
}
_activeFeedView->handlePut(feedtoken::make(std::make_unique<DaisyChainedFeedToken>(std::move(token))), putOp);
diff --git a/searchcore/src/vespa/searchcore/proton/server/feedhandler.h b/searchcore/src/vespa/searchcore/proton/server/feedhandler.h
index 4e9c016af9b..1de6eb79b63 100644
--- a/searchcore/src/vespa/searchcore/proton/server/feedhandler.h
+++ b/searchcore/src/vespa/searchcore/proton/server/feedhandler.h
@@ -11,7 +11,6 @@
#include "ipruneremoveddocumentshandler.h"
#include "tlswriter.h"
#include "transactionlogmanager.h"
-#include <persistence/spi/types.h>
#include <vespa/document/bucket/bucketid.h>
#include <vespa/searchcore/proton/common/doctypename.h>
#include <vespa/searchcore/proton/common/feedtoken.h>
@@ -58,7 +57,6 @@ private:
using Packet = search::transactionlog::Packet;
using RPC = search::transactionlog::client::RPC;
using SerialNum = search::SerialNum;
- using Timestamp = storage::spi::Timestamp;
using BucketId = document::BucketId;
using FeedStateSP = std::shared_ptr<FeedState>;
using FeedOperationUP = std::unique_ptr<FeedOperation>;
diff --git a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.cpp b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.cpp
index 84053786f69..13a70526789 100644
--- a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.cpp
@@ -75,7 +75,7 @@ LidSpaceCompactionHandler::createMoveOperation(const search::DocumentMetaData &d
return MoveOperation::UP();
}
auto doc = _subDb.retriever()->getFullDocument(moveFromLid);
- auto op = std::make_unique<MoveOperation>(document.bucketId, document.timestamp,
+ auto op = std::make_unique<MoveOperation>(document.bucketId, storage::spi::Timestamp(document.timestamp),
std::move(doc),
DbDocumentId(_subDb.sub_db_id(), moveFromLid),
_subDb.sub_db_id());
diff --git a/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.h b/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.h
index 6198f588a32..8963f095834 100644
--- a/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.h
+++ b/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.h
@@ -3,7 +3,6 @@
#include "blockable_maintenance_job.h"
#include "document_db_maintenance_config.h"
-#include <persistence/spi/types.h>
#include <vespa/document/bucket/bucketspace.h>
#include <vespa/vespalib/util/retain_guard.h>
#include <atomic>
diff --git a/searchcore/src/vespa/searchcore/proton/test/document.h b/searchcore/src/vespa/searchcore/proton/test/document.h
index 857678909fb..bdabf2937ad 100644
--- a/searchcore/src/vespa/searchcore/proton/test/document.h
+++ b/searchcore/src/vespa/searchcore/proton/test/document.h
@@ -2,7 +2,7 @@
#pragma once
#include <vespa/document/fieldvalue/document.h>
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
#include <vespa/searchlib/query/base.h>
namespace proton::test {
diff --git a/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h b/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h
index b9dacf61af8..60682ae90e5 100644
--- a/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h
+++ b/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h
@@ -61,16 +61,12 @@ struct DocumentMetaStoreObserver : public IDocumentMetaStore
Result inspect(const GlobalId &gid, uint64_t prepare_serial_num) override {
return _store.inspect(gid, prepare_serial_num);
}
- Result put(const GlobalId &gid,
- const BucketId &bucketId,
- const Timestamp &timestamp,
- uint32_t docSize,
- DocId lid,
- uint64_t prepare_serial_num) override
+ Result put(const GlobalId &gid, const BucketId &bucketId, Timestamp timestamp,
+ uint32_t docSize, DocId lid, uint64_t prepare_serial_num) override
{
return _store.put(gid, bucketId, timestamp, docSize, lid, prepare_serial_num);
}
- bool updateMetaData(DocId lid, const BucketId &bucketId, const Timestamp &timestamp) override {
+ bool updateMetaData(DocId lid, const BucketId &bucketId, Timestamp timestamp) override {
return _store.updateMetaData(lid, bucketId, timestamp);
}
bool remove(DocId lid, uint64_t prepare_serial_num) override {
@@ -87,8 +83,7 @@ struct DocumentMetaStoreObserver : public IDocumentMetaStore
bool validLid(DocId lid) const override {
return _store.validLid(lid);
}
- void removeBatch(const std::vector<DocId> &lidsToRemove,
- const DocId docIdLimit) override {
+ void removeBatch(const std::vector<DocId> &lidsToRemove, const DocId docIdLimit) override {
_store.removeBatch(lidsToRemove, docIdLimit);
}
const RawDocumentMetaData &getRawMetaData(DocId lid) const override {
diff --git a/searchlib/src/vespa/searchlib/aggregation/grouping.cpp b/searchlib/src/vespa/searchlib/aggregation/grouping.cpp
index f373b5fc0b3..c07e399b38e 100644
--- a/searchlib/src/vespa/searchlib/aggregation/grouping.cpp
+++ b/searchlib/src/vespa/searchlib/aggregation/grouping.cpp
@@ -121,8 +121,7 @@ Grouping::Grouping()
Grouping::Grouping(const Grouping &) = default;
Grouping & Grouping::operator = (const Grouping &) = default;
-
-Grouping::~Grouping() { }
+Grouping::~Grouping() = default;
void
Grouping::selectMembers(const vespalib::ObjectPredicate &predicate,
diff --git a/searchlib/src/vespa/searchlib/common/idocumentmetastore.h b/searchlib/src/vespa/searchlib/common/idocumentmetastore.h
index d663d1659e1..5c5791f585a 100644
--- a/searchlib/src/vespa/searchlib/common/idocumentmetastore.h
+++ b/searchlib/src/vespa/searchlib/common/idocumentmetastore.h
@@ -5,7 +5,8 @@
#include "lid_usage_stats.h"
#include <vespa/document/base/globalid.h>
#include <vespa/document/bucket/bucketid.h>
-#include <persistence/spi/types.h>
+#include <vector>
+#include <memory>
namespace search {
@@ -15,7 +16,7 @@ namespace search {
struct DocumentMetaData {
typedef uint32_t DocId;
DocId lid;
- storage::spi::Timestamp timestamp;
+ uint64_t timestamp;
document::BucketId bucketId;
document::GlobalId gid;
bool removed;
@@ -31,14 +32,14 @@ struct DocumentMetaData {
{ }
DocumentMetaData(DocId lid_,
- storage::spi::Timestamp timestamp_,
+ uint64_t timestamp_,
document::BucketId bucketId_,
const document::GlobalId &gid_) noexcept
: DocumentMetaData(lid_, timestamp_, bucketId_, gid_, false)
{ }
DocumentMetaData(DocId lid_,
- storage::spi::Timestamp timestamp_,
+ uint64_t timestamp_,
document::BucketId bucketId_,
const document::GlobalId &gid_,
bool removed_) noexcept
@@ -72,7 +73,7 @@ struct IDocumentMetaStore {
typedef uint32_t DocId;
typedef document::GlobalId GlobalId;
typedef document::BucketId BucketId;
- typedef storage::spi::Timestamp Timestamp;
+ typedef uint64_t Timestamp;
virtual ~IDocumentMetaStore() {}
diff --git a/storage/src/tests/common/teststorageapp.h b/storage/src/tests/common/teststorageapp.h
index 04cce2470f4..de1dc99bb6e 100644
--- a/storage/src/tests/common/teststorageapp.h
+++ b/storage/src/tests/common/teststorageapp.h
@@ -20,7 +20,7 @@
#include "testnodestateupdater.h"
#include <vespa/document/base/testdocman.h>
#include <vespa/document/bucket/fixed_bucket_spaces.h>
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
#include <vespa/storage/bucketdb/storbucketdb.h>
#include <vespa/storage/common/doneinitializehandler.h>
#include <vespa/storage/common/hostreporter/hostinfo.h>
diff --git a/storage/src/vespa/storage/persistence/bucketprocessor.h b/storage/src/vespa/storage/persistence/bucketprocessor.h
index 002cba6c15c..6338b447f7b 100644
--- a/storage/src/vespa/storage/persistence/bucketprocessor.h
+++ b/storage/src/vespa/storage/persistence/bucketprocessor.h
@@ -8,7 +8,7 @@
#include <vespa/persistence/spi/bucket.h>
#include <vespa/persistence/spi/context.h>
-#include <persistence/spi/types.h>
+#include <vespa/persistence/spi/types.h>
namespace document { class FieldSet; }
namespace storage::spi {