summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/feedoperation
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-06-07 07:34:57 +0200
committerHenning Baldersheim <balder@oath.com>2018-06-12 22:50:28 +0200
commit6c04171843d0d9ebc99f6b91303a76c62eb2aef4 (patch)
tree338ffa8e190c93ef4abab1ebd1ac79036c74cfd2 /searchcore/src/tests/proton/feedoperation
parent047ea0bed80966554e29a1db1b35361d946a3866 (diff)
1 - Use a backing buffer for the DocumentUpdate that always is source of truth.
2 - Use this buffer for re-serialization. 3 - Make deserialization lazy where possible. Currently lazy on replay and when arriving over the storageapi. Still needs to eager over documentapi. 4 - Deserialize eagerly in the persistence thread since those are plentyfull and not bottlenecked, instead of in the single master thread. Use real repo.
Diffstat (limited to 'searchcore/src/tests/proton/feedoperation')
-rw-r--r--searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
index 9a9d896f2b9..e87e9209a17 100644
--- a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
+++ b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
@@ -122,7 +122,7 @@ public:
}
auto makeUpdate() {
- auto upd(std::make_shared<DocumentUpdate>(_docType, docId));
+ auto upd(std::make_shared<DocumentUpdate>(*_repo, _docType, docId));
upd->addUpdate(FieldUpdate(upd->getType().getField("string")).
addUpdate(AssignValueUpdate(StringFieldValue("newval"))));
return upd;
@@ -136,6 +136,7 @@ public:
TEST("require that toString() on derived classes are meaningful")
{
+ DocumentTypeRepo repo;
BucketId bucket_id1(42);
BucketId bucket_id2(43);
BucketId bucket_id3(44);
@@ -146,7 +147,7 @@ TEST("require that toString() on derived classes are meaningful")
MyStreamHandler stream_handler;
DocumentIdT doc_id_limit = 15;
DocumentId doc_id("doc:foo:bar");
- DocumentUpdate::SP update(new DocumentUpdate(*DataType::DOCUMENT, doc_id));
+ DocumentUpdate::SP update(new DocumentUpdate(repo, *DataType::DOCUMENT, doc_id));
EXPECT_EQUAL("DeleteBucket(BucketId(0x0000000000000000), serialNum=0)",
DeleteBucketOperation().toString());