diff options
author | Henning Baldersheim <balder@oath.com> | 2018-06-07 07:34:57 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-06-12 22:50:28 +0200 |
commit | 6c04171843d0d9ebc99f6b91303a76c62eb2aef4 (patch) | |
tree | 338ffa8e190c93ef4abab1ebd1ac79036c74cfd2 /searchcore/src/tests/proton/persistenceengine | |
parent | 047ea0bed80966554e29a1db1b35361d946a3866 (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/persistenceengine')
-rw-r--r-- | searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp b/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp index 73580416e65..7f065d0cc15 100644 --- a/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp +++ b/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp @@ -67,7 +67,9 @@ createDoc(const DocumentType &docType, const DocumentId &docId) document::DocumentUpdate::SP createUpd(const DocumentType& docType, const DocumentId &docId) { - return document::DocumentUpdate::SP(new document::DocumentUpdate(docType, docId)); + static std::vector<std::unique_ptr<document::DocumentTypeRepo>> repoList; + repoList.emplace_back(std::make_unique<document::DocumentTypeRepo>(docType)); + return std::make_shared<document::DocumentUpdate>(*repoList.back(), docType, docId); } storage::spi::ClusterState |