summaryrefslogtreecommitdiffstats
path: root/searchcore/src/apps
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/apps')
-rw-r--r--searchcore/src/apps/tests/CMakeLists.txt1
-rw-r--r--searchcore/src/apps/tests/persistenceconformance_test.cpp14
-rw-r--r--searchcore/src/apps/vespa-transactionlog-inspect/vespa-transactionlog-inspect.cpp14
3 files changed, 20 insertions, 9 deletions
diff --git a/searchcore/src/apps/tests/CMakeLists.txt b/searchcore/src/apps/tests/CMakeLists.txt
index 12e19d40aca..532c89d6ab7 100644
--- a/searchcore/src/apps/tests/CMakeLists.txt
+++ b/searchcore/src/apps/tests/CMakeLists.txt
@@ -3,6 +3,7 @@ vespa_add_executable(searchcore_persistenceconformance_test_app TEST
SOURCES
persistenceconformance_test.cpp
DEPENDS
+ searchcore_test
searchcore_server
searchcore_initializer
searchcore_reprocessing
diff --git a/searchcore/src/apps/tests/persistenceconformance_test.cpp b/searchcore/src/apps/tests/persistenceconformance_test.cpp
index 483cc3f2792..fd0ace21955 100644
--- a/searchcore/src/apps/tests/persistenceconformance_test.cpp
+++ b/searchcore/src/apps/tests/persistenceconformance_test.cpp
@@ -169,14 +169,14 @@ class DocumentDBFactory : public DummyDBOwner {
private:
vespalib::string _baseDir;
DummyFileHeaderContext _fileHeaderContext;
- TransLogServer _tls;
vespalib::string _tlsSpec;
matching::QueryLimiter _queryLimiter;
vespalib::Clock _clock;
- mutable DummyWireService _metricsWireService;
- mutable MemoryConfigStores _config_stores;
+ mutable DummyWireService _metricsWireService;
+ mutable MemoryConfigStores _config_stores;
vespalib::ThreadStackExecutor _summaryExecutor;
- MockSharedThreadingService _shared_service;
+ MockSharedThreadingService _shared_service;
+ TransLogServer _tls;
storage::spi::dummy::DummyBucketExecutor _bucketExecutor;
static std::shared_ptr<ProtonConfig> make_proton_config() {
@@ -196,7 +196,7 @@ public:
vespalib::mkdir(_baseDir + "/" + docType.toString(), false);
vespalib::string inputCfg = _baseDir + "/" + docType.toString() + "/baseconfig";
{
- FileConfigManager fileCfg(inputCfg, "", docType.getName());
+ FileConfigManager fileCfg(_shared_service.transport(), inputCfg, "", docType.getName());
fileCfg.saveConfig(*snapshot, 1);
}
config::DirSpec spec(inputCfg + "/config-1");
@@ -208,7 +208,7 @@ public:
std::make_shared<BucketspacesConfig>(),
tuneFileDocDB, HwInfo());
mgr.forwardConfig(b);
- mgr.nextGeneration(0ms);
+ mgr.nextGeneration(_shared_service.transport(), 0ms);
return DocumentDB::create(_baseDir, mgr.getConfig(), _tlsSpec, _queryLimiter, _clock, docType, bucketSpace,
*b->getProtonConfigSP(), const_cast<DocumentDBFactory &>(*this),
_shared_service, _bucketExecutor, _tls, _metricsWireService,
@@ -221,13 +221,13 @@ public:
DocumentDBFactory::DocumentDBFactory(const vespalib::string &baseDir, int tlsListenPort)
: _baseDir(baseDir),
_fileHeaderContext(),
- _tls("tls", tlsListenPort, baseDir, _fileHeaderContext),
_tlsSpec(vespalib::make_string("tcp/localhost:%d", tlsListenPort)),
_queryLimiter(),
_clock(),
_metricsWireService(),
_summaryExecutor(8, 128_Ki),
_shared_service(_summaryExecutor, _summaryExecutor),
+ _tls(_shared_service.transport(), "tls", tlsListenPort, baseDir, _fileHeaderContext),
_bucketExecutor(2)
{}
DocumentDBFactory::~DocumentDBFactory() = default;
diff --git a/searchcore/src/apps/vespa-transactionlog-inspect/vespa-transactionlog-inspect.cpp b/searchcore/src/apps/vespa-transactionlog-inspect/vespa-transactionlog-inspect.cpp
index a7f23c382e9..40431b90e27 100644
--- a/searchcore/src/apps/vespa-transactionlog-inspect/vespa-transactionlog-inspect.cpp
+++ b/searchcore/src/apps/vespa-transactionlog-inspect/vespa-transactionlog-inspect.cpp
@@ -8,12 +8,14 @@
#include <vespa/vespalib/util/programoptions.h>
#include <vespa/vespalib/util/xmlstream.h>
#include <vespa/vespalib/util/time.h>
+#include <vespa/vespalib/util/size_literals.h>
#include <vespa/document/config/documenttypes_config_fwd.h>
#include <vespa/document/config/config-documenttypes.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/fieldvalue/document.h>
#include <vespa/document/update/documentupdate.h>
#include <vespa/config/helper/configgetter.hpp>
+#include <vespa/fnet/transport.h>
#include <vespa/fastos/app.h>
#include <iostream>
#include <thread>
@@ -324,7 +326,7 @@ public:
*/
struct Utility
{
- virtual ~Utility() {}
+ virtual ~Utility() = default;
typedef std::unique_ptr<Utility> UP;
virtual int run() = 0;
};
@@ -371,6 +373,8 @@ class BaseUtility : public Utility
protected:
const BaseOptions &_bopts;
DummyFileHeaderContext _fileHeader;
+ FastOS_ThreadPool _threadPool;
+ FNET_Transport _transport;
TransLogServer _server;
client::TransLogClient _client;
@@ -378,9 +382,15 @@ public:
BaseUtility(const BaseOptions &bopts)
: _bopts(bopts),
_fileHeader(),
- _server(_bopts.tlsName, _bopts.listenPort, _bopts.tlsDir, _fileHeader),
+ _threadPool(64_Ki),
+ _transport(),
+ _server(_transport, _bopts.tlsName, _bopts.listenPort, _bopts.tlsDir, _fileHeader),
_client(vespalib::make_string("tcp/localhost:%d", _bopts.listenPort))
{
+ _transport.Start(&_threadPool);
+ }
+ ~BaseUtility() override {
+ _transport.ShutDown(true);
}
virtual int run() override = 0;
};