aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2019-05-31 12:09:33 +0000
committerGeir Storli <geirst@verizonmedia.com>2019-05-31 12:09:33 +0000
commit38a7db76c5d6f4c6c6f1c55218d5671768768692 (patch)
tree775211700e47e67b7027904df74ff150a0da69df /searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
parentcb165b874d9d7bdc31c0081d7ec26bb6cd963bac (diff)
Fix bug in lid space compaction where partial updates to attributes were lost when moving a document.
Instead of using the document store directly (when reading the document to move) the document retriever must be used. The document retriever patches in attribute values and also correctly waits for the thread writing to the document store. The job moving documents between the "ready" and "not ready" sub databases was already doing this correctly.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp')
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
index af6a9d38385..10b1c829674 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
@@ -191,7 +191,7 @@ MySubDb::MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo, std::share
_metaStore(*_metaStoreSP),
_realRetriever(std::make_shared<MyDocumentRetriever>(repo)),
_retriever(_realRetriever),
- _subDb(_metaStoreSP, _retriever, subDbId), _docs(),
+ _subDb("my_sub_db", subDbId, _metaStoreSP, _retriever, IFeedView::SP()), _docs(),
_bucketDBHandler(*bucketDB)
{
_bucketDBHandler.addDocumentMetaStore(_metaStoreSP.get(), 0);
@@ -238,7 +238,11 @@ struct MoveFixture
void setupForBucket(const BucketId &bucket,
uint32_t sourceSubDbId,
uint32_t targetSubDbId) {
- _source._subDb._subDbId = sourceSubDbId;
+ _source._subDb = MaintenanceDocumentSubDB(_source._subDb.name(),
+ sourceSubDbId,
+ _source._subDb.meta_store(),
+ _source._subDb.retriever(),
+ _source._subDb.feed_view());
_mover.setupForBucket(bucket, &_source._subDb, targetSubDbId, _handler, _bucketDb);
}
void moveDocuments(size_t maxDocsToMove) {