aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-20 21:24:22 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-02-20 23:46:18 +0000
commit1bb2800fb1bf312689115a7230b1d3ead74d4ac6 (patch)
tree29c84e9a2b9451e0fc4cd8d5e2908c26eb1758fd /searchcore/src/tests/proton/documentdb/documentdb_test.cpp
parent1cfea65b9bc71b472e9dc3370b120cf428b6ece0 (diff)
Use a common FNET_Transport owned by Proton in both SceduledExecutor and TransactionLogServer.
This reduces the number of Transport object by 1 per document type and netto 1 in Proton. Each of them contains 2 threads. In addition it uses a common Transport for the RpcFileAcquirer objects used during config fetching. This prevents creating 3 temporary Transport objects on every reconfig.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/documentdb_test.cpp')
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdb_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
index 7ba3e0b8240..bef8d0c49bb 100644
--- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
@@ -149,7 +149,7 @@ Fixture::Fixture(bool file_config)
_bucketExecutor(2),
_db(),
_fileHeaderContext(),
- _tls("tmp", 9014, ".", _fileHeaderContext),
+ _tls(_shared_service.transport(), "tmp", 9014, ".", _fileHeaderContext),
_queryLimiter(),
_clock()
{
@@ -165,7 +165,7 @@ Fixture::Fixture(bool file_config)
std::make_shared<BucketspacesConfig>(),
tuneFileDocumentDB, HwInfo());
mgr.forwardConfig(b);
- mgr.nextGeneration(0ms);
+ mgr.nextGeneration(_shared_service.transport(), 0ms);
_db = DocumentDB::create(".", mgr.getConfig(), "tcp/localhost:9014", _queryLimiter, _clock, DocTypeName("typea"),
makeBucketSpace(),
*b->getProtonConfigSP(), _myDBOwner, _shared_service, _bucketExecutor, _tls, _dummy,
@@ -183,7 +183,7 @@ std::unique_ptr<ConfigStore>
Fixture::make_config_store()
{
if (_file_config) {
- return std::make_unique<FileConfigManager>("config", "", "typea");
+ return std::make_unique<FileConfigManager>(_shared_service.transport(), "config", "", "typea");
} else {
return std::make_unique<MemoryConfigStore>();
}