aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-11-22 12:15:49 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-11-22 12:15:49 +0000
commit78eefb4a7e496449bd0e2a3322026b634c55c9bf (patch)
treed5797da0946ddd799e5f7ad95a22a00a50ef7914 /searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
parent8e72772625e0487fb750e9cd9b80a57ed2362940 (diff)
Differentiate the levels of sync required.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp')
-rw-r--r--searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
index a9faeceab48..e3e6ac6321e 100644
--- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
@@ -325,6 +325,10 @@ struct FixtureBase
void runInMasterAndSync(FunctionType func) {
proton::test::runInMasterAndSync(_writeService, func);
}
+ template <typename FunctionType>
+ void runInMaster(FunctionType func) {
+ proton::test::runInMaster(_writeService, func);
+ }
void init() {
DocumentSubDbInitializer::SP task =
_subDb.createInitializer(*_snapshot->_cfg, Traits::configSerial(), IndexConfig());
@@ -783,7 +787,7 @@ struct DocumentHandler
void putDoc(PutOperation &op) {
IFeedView::SP feedView = _f._subDb.getFeedView();
vespalib::Gate gate;
- _f.runInMasterAndSync([&]() {
+ _f.runInMaster([&]() {
feedView->preparePut(op);
feedView->handlePut(FeedToken(), op);
feedView->forceCommit(CommitParam(op.getSerialNum()), std::make_shared<vespalib::GateCallback>(gate));
@@ -793,7 +797,7 @@ struct DocumentHandler
void moveDoc(MoveOperation &op) {
IFeedView::SP feedView = _f._subDb.getFeedView();
vespalib::Gate gate;
- _f.runInMasterAndSync([&]() {
+ _f.runInMaster([&]() {
auto onDone = std::make_shared<vespalib::GateCallback>(gate);
feedView->handleMove(op, onDone);
feedView->forceCommit(CommitParam(op.getSerialNum()), onDone);
@@ -804,7 +808,7 @@ struct DocumentHandler
{
IFeedView::SP feedView = _f._subDb.getFeedView();
vespalib::Gate gate;
- _f.runInMasterAndSync([&]() {
+ _f.runInMaster([&]() {
feedView->prepareRemove(op);
feedView->handleRemove(FeedToken(), op);
feedView->forceCommit(CommitParam(op.getSerialNum()), std::make_shared<vespalib::GateCallback>(gate));