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>2020-09-01 10:11:40 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-09-01 10:11:40 +0000
commit725ddc396fefce00829660226e993f798f0d8068 (patch)
treebca8446dcc1540087371c18c7ad81fe805bcb238 /searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
parent7c1c6db4947787c24d4a0e88709e6451877b2bc3 (diff)
Avoid commitAndWait. It is a blocking call that might deadlock.
This is already safely taken care of in syncViews.
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.cpp28
1 files changed, 10 insertions, 18 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 43c018d1fbe..c705010ada7 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
@@ -147,8 +147,7 @@ struct MyStoreOnlyContext
StoreOnlyContext _ctx;
MyStoreOnlyContext(IThreadingService &writeService,
std::shared_ptr<BucketDBOwner> bucketDB,
- IBucketDBHandlerInitializer & bucketDBHandlerInitializer,
- ICommitable & commitable);
+ IBucketDBHandlerInitializer & bucketDBHandlerInitializer);
~MyStoreOnlyContext();
const MySubDBOwner &getOwner() const {
return _owner;
@@ -157,8 +156,7 @@ struct MyStoreOnlyContext
MyStoreOnlyContext::MyStoreOnlyContext(IThreadingService &writeService,
std::shared_ptr<BucketDBOwner> bucketDB,
- IBucketDBHandlerInitializer &bucketDBHandlerInitializer,
- ICommitable &)
+ IBucketDBHandlerInitializer &bucketDBHandlerInitializer)
: _owner(), _syncProxy(), _getSerialNum(), _fileHeader(),
_metrics(DOCTYPE_NAME, 1), _configMutex(), _hwInfo(),
_ctx(_owner, _syncProxy, _getSerialNum, _fileHeader, writeService, bucketDB,
@@ -185,8 +183,7 @@ struct MyFastAccessContext
FastAccessContext _ctx;
MyFastAccessContext(IThreadingService &writeService,
std::shared_ptr<BucketDBOwner> bucketDB,
- IBucketDBHandlerInitializer & bucketDBHandlerInitializer,
- ICommitable & commitable);
+ IBucketDBHandlerInitializer & bucketDBHandlerInitializer);
~MyFastAccessContext();
const MyMetricsWireService &getWireService() const {
return _wireService;
@@ -198,9 +195,8 @@ struct MyFastAccessContext
MyFastAccessContext::MyFastAccessContext(IThreadingService &writeService,
std::shared_ptr<BucketDBOwner> bucketDB,
- IBucketDBHandlerInitializer & bucketDBHandlerInitializer,
- ICommitable & commitable)
- : _storeOnlyCtx(writeService, bucketDB, bucketDBHandlerInitializer, commitable),
+ IBucketDBHandlerInitializer & bucketDBHandlerInitializer)
+ : _storeOnlyCtx(writeService, bucketDB, bucketDBHandlerInitializer),
_attributeMetrics(nullptr),
_wireService(),
_ctx(_storeOnlyCtx._ctx, _attributeMetrics, _wireService)
@@ -224,8 +220,7 @@ struct MySearchableContext
SearchableContext _ctx;
MySearchableContext(IThreadingService &writeService,
std::shared_ptr<BucketDBOwner> bucketDB,
- IBucketDBHandlerInitializer & bucketDBHandlerInitializer,
- ICommitable & commitable);
+ IBucketDBHandlerInitializer & bucketDBHandlerInitializer);
~MySearchableContext();
const MyMetricsWireService &getWireService() const {
return _fastUpdCtx.getWireService();
@@ -238,13 +233,11 @@ struct MySearchableContext
MySearchableContext::MySearchableContext(IThreadingService &writeService,
std::shared_ptr<BucketDBOwner> bucketDB,
- IBucketDBHandlerInitializer & bucketDBHandlerInitializer,
- ICommitable & commitable)
- : _fastUpdCtx(writeService, bucketDB, bucketDBHandlerInitializer, commitable),
+ IBucketDBHandlerInitializer & bucketDBHandlerInitializer)
+ : _fastUpdCtx(writeService, bucketDB, bucketDBHandlerInitializer),
_queryLimiter(), _clock(),
_ctx(_fastUpdCtx._ctx, _queryLimiter,
- _clock, dynamic_cast<vespalib::SyncableThreadExecutor &>(writeService.shared()),
- commitable)
+ _clock, dynamic_cast<vespalib::SyncableThreadExecutor &>(writeService.shared()))
{}
MySearchableContext::~MySearchableContext() = default;
@@ -314,7 +307,6 @@ struct FixtureBase
typename Traits::Config _cfg;
std::shared_ptr<BucketDBOwner> _bucketDB;
BucketDBHandler _bucketDBHandler;
- Committer _committer;
typename Traits::Context _ctx;
typename Traits::Schema _baseSchema;
MyConfigSnapshot::UP _snapshot;
@@ -327,7 +319,7 @@ struct FixtureBase
_cfg(),
_bucketDB(std::make_shared<BucketDBOwner>()),
_bucketDBHandler(*_bucketDB),
- _ctx(_writeService, _bucketDB, _bucketDBHandler, _committer),
+ _ctx(_writeService, _bucketDB, _bucketDBHandler),
_baseSchema(),
_snapshot(new MyConfigSnapshot(_baseSchema, Traits::ConfigDir::dir())),
_baseDir(BASE_DIR + "/" + SUB_NAME, BASE_DIR),