From 38a7db76c5d6f4c6c6f1c55218d5671768768692 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Fri, 31 May 2019 12:09:33 +0000 Subject: 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. --- .../documentdb/documentbucketmover/documentbucketmover_test.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'searchcore/src/tests/proton/documentdb/documentbucketmover') 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 &repo, std::share _metaStore(*_metaStoreSP), _realRetriever(std::make_shared(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) { -- cgit v1.2.3