aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-11-26 10:40:35 +0100
committerGitHub <noreply@github.com>2021-11-26 10:40:35 +0100
commit1a9d505710061196383e649f0918cca7cd41a066 (patch)
tree46ce65f041e82a8d2ce18a06ef4be8cd040d2358 /searchcore
parentd58584fd5b8cb94663069701e36b015f081d1e11 (diff)
parent549182b98bc0e9c0aa4759bece0c2e33f453827c (diff)
Merge pull request #20230 from vespa-engine/balder/summary-only-needs-a-thread-executor
Summary only needs a ThreadExecutor. Also GC some unused members and …
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.h19
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.cpp24
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h22
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp22
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h5
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.h5
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h16
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h40
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h10
15 files changed, 90 insertions, 104 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.cpp
index 07580817dc9..6d71b81cb8b 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.cpp
@@ -2,7 +2,6 @@
#include "summarycompacttarget.h"
#include <vespa/vespalib/util/lambdatask.h>
-#include <vespa/searchcorespi/index/i_thread_service.h>
#include <future>
using search::IDocumentStore;
@@ -39,7 +38,7 @@ public:
}
-SummaryCompactTarget::SummaryCompactTarget(searchcorespi::index::IThreadService & summaryService, IDocumentStore & docStore)
+SummaryCompactTarget::SummaryCompactTarget(vespalib::Executor & summaryService, IDocumentStore & docStore)
: IFlushTarget("summary.compact", Type::GC, Component::DOCUMENT_STORE),
_summaryService(summaryService),
_docStore(docStore),
@@ -82,10 +81,4 @@ SummaryCompactTarget::initFlush(SerialNum currentSerial, std::shared_ptr<search:
return future.get();
}
-uint64_t
-SummaryCompactTarget::getApproxBytesToWriteToDisk() const
-{
- return 0;
-}
-
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.h b/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.h
index a5f39e953a5..c8035a544f2 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.h
@@ -15,23 +15,22 @@ namespace proton {
class SummaryCompactTarget : public searchcorespi::IFlushTarget {
private:
using FlushStats = searchcorespi::FlushStats;
- searchcorespi::index::IThreadService &_summaryService;
+ vespalib::Executor &_summaryService;
search::IDocumentStore & _docStore;
FlushStats _lastStats;
public:
- SummaryCompactTarget(searchcorespi::index::IThreadService & summaryService, search::IDocumentStore & docStore);
+ SummaryCompactTarget(vespalib::Executor & summaryService, search::IDocumentStore & docStore);
- // Implements IFlushTarget
- virtual MemoryGain getApproxMemoryGain() const override;
- virtual DiskGain getApproxDiskGain() const override;
- virtual SerialNum getFlushedSerialNum() const override;
- virtual Time getLastFlushTime() const override;
+ MemoryGain getApproxMemoryGain() const override;
+ DiskGain getApproxDiskGain() const override;
+ SerialNum getFlushedSerialNum() const override;
+ Time getLastFlushTime() const override;
- virtual Task::UP initFlush(SerialNum currentSerial, std::shared_ptr<search::IFlushToken> flush_token) override;
+ Task::UP initFlush(SerialNum currentSerial, std::shared_ptr<search::IFlushToken> flush_token) override;
- virtual FlushStats getLastFlushStats() const override { return _lastStats; }
- virtual uint64_t getApproxBytesToWriteToDisk() const override;
+ FlushStats getLastFlushStats() const override { return _lastStats; }
+ uint64_t getApproxBytesToWriteToDisk() const override { return 0; }
};
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.cpp
index 7f164af7339..45fc23175bf 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.cpp
@@ -1,7 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "summaryflushtarget.h"
-#include <vespa/searchcorespi/index/i_thread_service.h>
#include <vespa/vespalib/util/lambdatask.h>
using search::IDocumentStore;
@@ -28,7 +27,7 @@ public:
{
_currSerial = _docStore.initFlush(currSerial);
}
- virtual void run() override {
+ void run() override {
_docStore.flush(_currSerial);
updateStats();
}
@@ -37,17 +36,13 @@ public:
_stats.setPath(_docStore.getBaseDir());
}
- virtual SerialNum
- getFlushSerial() const override
- {
- return _currSerial;
- }
+ SerialNum getFlushSerial() const override { return _currSerial; }
};
}
SummaryFlushTarget::SummaryFlushTarget(IDocumentStore & docStore,
- searchcorespi::index::IThreadService & summaryService)
+ vespalib::Executor & summaryService)
: IFlushTarget("summary.flush", Type::SYNC, Component::DOCUMENT_STORE),
_docStore(docStore),
_summaryService(summaryService),
@@ -62,12 +57,6 @@ SummaryFlushTarget::getApproxMemoryGain() const
return MemoryGain(_docStore.memoryUsed(), _docStore.memoryMeta());
}
-IFlushTarget::DiskGain
-SummaryFlushTarget::getApproxDiskGain() const
-{
- return DiskGain(0, 0);
-}
-
IFlushTarget::Time
SummaryFlushTarget::getLastFlushTime() const
{
@@ -97,11 +86,4 @@ SummaryFlushTarget::initFlush(SerialNum currentSerial, std::shared_ptr<search::I
return future.get();
}
-uint64_t
-SummaryFlushTarget::getApproxBytesToWriteToDisk() const
-{
- return 0;
-}
-
-
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h b/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h
index 99cfa1a2080..f864b922af8 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h
@@ -4,7 +4,6 @@
#include <vespa/searchlib/docstore/idocumentstore.h>
#include <vespa/searchcorespi/flush/iflushtarget.h>
-namespace searchcorespi::index { struct IThreadService; }
namespace proton {
/**
@@ -14,25 +13,24 @@ class SummaryFlushTarget : public searchcorespi::IFlushTarget {
private:
using FlushStats = searchcorespi::FlushStats;
search::IDocumentStore & _docStore;
- searchcorespi::index::IThreadService & _summaryService;
- FlushStats _lastStats;
+ vespalib::Executor & _summaryService;
+ FlushStats _lastStats;
Task::UP internalInitFlush(SerialNum currentSerial);
public:
SummaryFlushTarget(search::IDocumentStore & docStore,
- searchcorespi::index::IThreadService & summaryService);
+ vespalib::Executor & summaryService);
- // Implements IFlushTarget
- virtual MemoryGain getApproxMemoryGain() const override;
- virtual DiskGain getApproxDiskGain() const override;
- virtual SerialNum getFlushedSerialNum() const override;
- virtual Time getLastFlushTime() const override;
+ MemoryGain getApproxMemoryGain() const override;
+ DiskGain getApproxDiskGain() const override { return DiskGain(0, 0); }
+ SerialNum getFlushedSerialNum() const override;
+ Time getLastFlushTime() const override;
- virtual Task::UP initFlush(SerialNum currentSerial, std::shared_ptr<search::IFlushToken> flush_token) override;
+ Task::UP initFlush(SerialNum currentSerial, std::shared_ptr<search::IFlushToken> flush_token) override;
- virtual FlushStats getLastFlushStats() const override { return _lastStats; }
- virtual uint64_t getApproxBytesToWriteToDisk() const override;
+ FlushStats getLastFlushStats() const override { return _lastStats; }
+ uint64_t getApproxBytesToWriteToDisk() const override { return 0; }
};
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
index 4570151d3eb..6f65d76789a 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
@@ -7,7 +7,6 @@
#include <vespa/config/print/ostreamconfigwriter.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/juniper/rpinterface.h>
-#include <vespa/searchcorespi/index/i_thread_service.h>
#include <vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.h>
#include <vespa/vespalib/util/lambdatask.h>
#include <vespa/searchsummary/docsummary/docsumconfig.h>
@@ -45,12 +44,12 @@ namespace {
class ShrinkSummaryLidSpaceFlushTarget : public ShrinkLidSpaceFlushTarget
{
using ICompactableLidSpace = search::common::ICompactableLidSpace;
- searchcorespi::index::IThreadService & _summaryService;
+ vespalib::Executor & _summaryService;
public:
ShrinkSummaryLidSpaceFlushTarget(const vespalib::string &name, Type type, Component component,
SerialNum flushedSerialNum, vespalib::system_time lastFlushTime,
- searchcorespi::index::IThreadService & summaryService,
+ vespalib::Executor & summaryService,
std::shared_ptr<ICompactableLidSpace> target);
~ShrinkSummaryLidSpaceFlushTarget() override;
Task::UP initFlush(SerialNum currentSerial, std::shared_ptr<search::IFlushToken> flush_token) override;
@@ -59,7 +58,7 @@ public:
ShrinkSummaryLidSpaceFlushTarget::
ShrinkSummaryLidSpaceFlushTarget(const vespalib::string &name, Type type, Component component,
SerialNum flushedSerialNum, vespalib::system_time lastFlushTime,
- searchcorespi::index::IThreadService & summaryService,
+ vespalib::Executor & summaryService,
std::shared_ptr<ICompactableLidSpace> target)
: ShrinkLidSpaceFlushTarget(name, type, component, flushedSerialNum, lastFlushTime, std::move(target)),
_summaryService(summaryService)
@@ -153,9 +152,7 @@ SummaryManager::SummaryManager(vespalib::ThreadExecutor & executor, const LogDoc
search::IBucketizer::SP bucketizer)
: _baseDir(baseDir),
_docTypeName(docTypeName),
- _docStore(),
- _tuneFileSummary(tuneFileSummary),
- _currentSerial(0u)
+ _docStore()
{
_docStore = std::make_shared<LogDocumentStore>(executor, baseDir, storeConfig, growStrategy, tuneFileSummary,
fileHeaderContext, tlSyncer, std::move(bucketizer));
@@ -167,27 +164,24 @@ void
SummaryManager::putDocument(uint64_t syncToken, search::DocumentIdT lid, const Document & doc)
{
_docStore->write(syncToken, lid, doc);
- _currentSerial = syncToken;
}
void
SummaryManager::putDocument(uint64_t syncToken, search::DocumentIdT lid, const vespalib::nbostream & doc)
{
_docStore->write(syncToken, lid, doc);
- _currentSerial = syncToken;
}
void
SummaryManager::removeDocument(uint64_t syncToken, search::DocumentIdT lid)
{
_docStore->remove(syncToken, lid);
- _currentSerial = syncToken;
}
namespace {
IFlushTarget::SP
-createShrinkLidSpaceFlushTarget(searchcorespi::index::IThreadService & summaryService, IDocumentStore::SP docStore)
+createShrinkLidSpaceFlushTarget(vespalib::Executor & summaryService, IDocumentStore::SP docStore)
{
return std::make_shared<ShrinkSummaryLidSpaceFlushTarget>("summary.shrink",
IFlushTarget::Type::GC,
@@ -200,7 +194,8 @@ createShrinkLidSpaceFlushTarget(searchcorespi::index::IThreadService & summarySe
}
-IFlushTarget::List SummaryManager::getFlushTargets(searchcorespi::index::IThreadService & summaryService)
+IFlushTarget::List
+SummaryManager::getFlushTargets(vespalib::Executor & summaryService)
{
IFlushTarget::List ret;
ret.push_back(std::make_shared<SummaryFlushTarget>(getBackingStore(), summaryService));
@@ -211,7 +206,8 @@ IFlushTarget::List SummaryManager::getFlushTargets(searchcorespi::index::IThread
return ret;
}
-void SummaryManager::reconfigure(const LogDocumentStore::Config & config) {
+void
+SummaryManager::reconfigure(const LogDocumentStore::Config & config) {
auto & docStore = dynamic_cast<LogDocumentStore &> (*_docStore);
docStore.reconfigure(config);
}
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
index 9bff8723ff6..b3cbd399262 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
@@ -12,7 +12,6 @@
#include <vespa/document/fieldvalue/document.h>
#include <vespa/vespalib/util/threadexecutor.h>
-namespace searchcorespi::index { struct IThreadService; }
namespace search { class IBucketizer; }
namespace search::common { class FileHeaderContext; }
@@ -58,8 +57,6 @@ private:
vespalib::string _baseDir;
DocTypeName _docTypeName;
std::shared_ptr<search::IDocumentStore> _docStore;
- const search::TuneFileSummary _tuneFileSummary;
- uint64_t _currentSerial;
public:
typedef std::shared_ptr<SummaryManager> SP;
@@ -77,7 +74,7 @@ public:
void putDocument(uint64_t syncToken, search::DocumentIdT lid, const document::Document & doc);
void putDocument(uint64_t syncToken, search::DocumentIdT lid, const vespalib::nbostream & doc);
void removeDocument(uint64_t syncToken, search::DocumentIdT lid);
- searchcorespi::IFlushTarget::List getFlushTargets(searchcorespi::index::IThreadService & summaryService);
+ searchcorespi::IFlushTarget::List getFlushTargets(vespalib::Executor & summaryService);
ISummarySetup::SP
createSummarySetup(const vespa::config::search::SummaryConfig &summaryCfg,
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.cpp b/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.cpp
index af24dcd976d..63644e5c7ab 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.cpp
@@ -7,14 +7,12 @@ namespace proton {
ExecutorThreadingServiceStats::ExecutorThreadingServiceStats(Stats masterExecutorStats,
Stats indexExecutorStats,
Stats summaryExecutorStats,
- Stats sharedExecutorStats,
Stats indexFieldInverterExecutorStats,
Stats indexFieldWriterExecutorStats,
Stats attributeFieldWriterExecutorStats)
: _masterExecutorStats(masterExecutorStats),
_indexExecutorStats(indexExecutorStats),
_summaryExecutorStats(summaryExecutorStats),
- _sharedExecutorStats(sharedExecutorStats),
_indexFieldInverterExecutorStats(indexFieldInverterExecutorStats),
_indexFieldWriterExecutorStats(indexFieldWriterExecutorStats),
_attributeFieldWriterExecutorStats(attributeFieldWriterExecutorStats)
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h b/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h
index e2c53af11b5..8015ec83ae9 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/executor_threading_service_stats.h
@@ -16,7 +16,6 @@ private:
Stats _masterExecutorStats;
Stats _indexExecutorStats;
Stats _summaryExecutorStats;
- Stats _sharedExecutorStats;
Stats _indexFieldInverterExecutorStats;
Stats _indexFieldWriterExecutorStats;
Stats _attributeFieldWriterExecutorStats;
@@ -24,7 +23,6 @@ public:
ExecutorThreadingServiceStats(Stats masterExecutorStats,
Stats indexExecutorStats,
Stats summaryExecutorStats,
- Stats sharedExecutorStats,
Stats indexFieldInverterExecutorStats,
Stats indexFieldWriterExecutorStats,
Stats attributeFieldWriterExecutorStats);
@@ -33,7 +31,6 @@ public:
const Stats &getMasterExecutorStats() const { return _masterExecutorStats; }
const Stats &getIndexExecutorStats() const { return _indexExecutorStats; }
const Stats &getSummaryExecutorStats() const { return _summaryExecutorStats; }
- const Stats &getSharedExecutorStats() const { return _sharedExecutorStats; }
const Stats &getIndexFieldInverterExecutorStats() const { return _indexFieldInverterExecutorStats; }
const Stats &getIndexFieldWriterExecutorStats() const { return _indexFieldWriterExecutorStats; }
const Stats &getAttributeFieldWriterExecutorStats() const { return _attributeFieldWriterExecutorStats; }
diff --git a/searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.cpp b/searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.cpp
index 89de400216e..daf54eac859 100644
--- a/searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.cpp
@@ -59,7 +59,7 @@ convert_executor_to_slime(const ISequencedTaskExecutor* executor, Cursor& object
}
-ExecutorThreadingServiceExplorer::ExecutorThreadingServiceExplorer(ExecutorThreadingService& service)
+ExecutorThreadingServiceExplorer::ExecutorThreadingServiceExplorer(searchcorespi::index::IThreadingService& service)
: _service(service)
{
}
@@ -71,9 +71,9 @@ ExecutorThreadingServiceExplorer::get_state(const vespalib::slime::Inserter& ins
{
auto& object = inserter.insertObject();
if (full) {
- convert_executor_to_slime(&_service.getMasterExecutor(), object.setObject("master"));
- convert_executor_to_slime(&_service.getIndexExecutor(), object.setObject("index"));
- convert_executor_to_slime(&_service.getSummaryExecutor(), object.setObject("summary"));
+ convert_executor_to_slime(&_service.master(), object.setObject("master"));
+ convert_executor_to_slime(&_service.index(), object.setObject("index"));
+ convert_executor_to_slime(&_service.summary(), object.setObject("summary"));
convert_executor_to_slime(&_service.indexFieldInverter(), object.setObject("index_field_inverter"));
convert_executor_to_slime(&_service.indexFieldWriter(), object.setObject("index_field_writer"));
convert_executor_to_slime(&_service.attributeFieldWriter(), object.setObject("attribute_field_writer"));
diff --git a/searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.h b/searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.h
index 374a0e6b494..70ed23c6271 100644
--- a/searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.h
+++ b/searchcore/src/vespa/searchcore/proton/server/executor_threading_service_explorer.h
@@ -4,6 +4,7 @@
#include <vespa/vespalib/net/state_explorer.h>
+namespace searchcorespi::index { struct IThreadingService; }
namespace proton {
class ExecutorThreadingService;
@@ -13,10 +14,10 @@ class ExecutorThreadingService;
*/
class ExecutorThreadingServiceExplorer : public vespalib::StateExplorer {
private:
- ExecutorThreadingService& _service;
+ searchcorespi::index::IThreadingService & _service;
public:
- ExecutorThreadingServiceExplorer(ExecutorThreadingService& service);
+ ExecutorThreadingServiceExplorer(searchcorespi::index::IThreadingService & service);
~ExecutorThreadingServiceExplorer();
void get_state(const vespalib::slime::Inserter& inserter, bool full) const override;
diff --git a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
index 145dc48a57a..6c537b1beeb 100644
--- a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
@@ -155,21 +155,20 @@ ExecutorThreadingService::getStats()
auto master_stats = _masterExecutor.getStats();
auto index_stats = _indexExecutor->getStats();
auto summary_stats = _summaryExecutor->getStats();
- auto shared_stats = _sharedExecutor.getStats();
if (_shared_field_writer == SharedFieldWriterExecutor::INDEX) {
auto field_writer_stats = _field_writer->getStats();
- return ExecutorThreadingServiceStats(master_stats, index_stats, summary_stats, shared_stats,
+ return ExecutorThreadingServiceStats(master_stats, index_stats, summary_stats,
field_writer_stats,
field_writer_stats,
_attribute_field_writer_ptr->getStats());
} else if (_shared_field_writer == SharedFieldWriterExecutor::INDEX_AND_ATTRIBUTE) {
auto field_writer_stats = _field_writer->getStats();
- return ExecutorThreadingServiceStats(master_stats, index_stats, summary_stats, shared_stats,
+ return ExecutorThreadingServiceStats(master_stats, index_stats, summary_stats,
field_writer_stats,
field_writer_stats,
field_writer_stats);
} else {
- return ExecutorThreadingServiceStats(master_stats, index_stats, summary_stats, shared_stats,
+ return ExecutorThreadingServiceStats(master_stats, index_stats, summary_stats,
_index_field_inverter_ptr->getStats(),
_index_field_writer_ptr->getStats(),
_attribute_field_writer_ptr->getStats());
diff --git a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h
index c8eda4e86f3..b3d05021ab5 100644
--- a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h
+++ b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h
@@ -60,18 +60,6 @@ public:
uint32_t field_task_limit,
uint32_t summary_task_limit);
- // Expose the underlying executors for stats fetching and testing.
- // TOD: Remove - This is only used for casting to check the underlying type
- vespalib::ThreadExecutor &getMasterExecutor() {
- return _masterExecutor;
- }
- vespalib::ThreadExecutor &getIndexExecutor() {
- return *_indexExecutor;
- }
- vespalib::ThreadExecutor &getSummaryExecutor() {
- return *_summaryExecutor;
- }
-
searchcorespi::index::IThreadService &master() override {
return _masterService;
}
@@ -79,8 +67,8 @@ public:
return _indexService;
}
- searchcorespi::index::IThreadService &summary() override {
- return _summaryService;
+ vespalib::ThreadExecutor &summary() override {
+ return *_summaryExecutor;
}
vespalib::ThreadExecutor &shared() override {
return _sharedExecutor;
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h
index 4e7a62548c2..c55e451d923 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h
@@ -153,7 +153,7 @@ protected:
IGidToLidChangeHandler &_gidToLidChangeHandler;
private:
- searchcorespi::index::IThreadService & summaryExecutor() {
+ vespalib::Executor & summaryExecutor() {
return _writeService.summary();
}
void putSummary(SerialNum serialNum, Lid lid, FutureStream doc, OnOperationDoneType onDone);
diff --git a/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h b/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h
index 26a92841999..5b679da7b51 100644
--- a/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h
+++ b/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h
@@ -5,6 +5,45 @@
namespace proton::test {
+class ThreadExecutorObserver : public vespalib::ThreadExecutor
+{
+private:
+ vespalib::ThreadExecutor &_service;
+ uint32_t _executeCnt;
+
+public:
+ ThreadExecutorObserver(vespalib::ThreadExecutor &service)
+ : _service(service),
+ _executeCnt(0)
+ {
+ }
+
+ uint32_t getExecuteCnt() const { return _executeCnt; }
+
+ vespalib::Executor::Task::UP execute(vespalib::Executor::Task::UP task) override {
+ ++_executeCnt;
+ return _service.execute(std::move(task));
+ }
+
+ size_t getNumThreads() const override { return _service.getNumThreads(); }
+
+ vespalib::ExecutorStats getStats() override {
+ return _service.getStats();
+ }
+
+ void setTaskLimit(uint32_t taskLimit) override {
+ _service.setTaskLimit(taskLimit);
+ }
+
+ uint32_t getTaskLimit() const override {
+ return _service.getTaskLimit();
+ }
+
+ void wakeup() override {
+ _service.wakeup();
+ }
+};
+
class ThreadServiceObserver : public searchcorespi::index::IThreadService
{
private:
@@ -55,7 +94,6 @@ public:
void wakeup() override {
_service.wakeup();
}
-
};
}
diff --git a/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h b/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h
index 135c9dc0a07..18489624d1a 100644
--- a/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h
+++ b/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h
@@ -12,9 +12,9 @@ class ThreadingServiceObserver : public searchcorespi::index::IThreadingService
{
private:
searchcorespi::index::IThreadingService &_service;
- ThreadServiceObserver _master;
- ThreadServiceObserver _index;
- ThreadServiceObserver _summary;
+ ThreadServiceObserver _master;
+ ThreadServiceObserver _index;
+ ThreadExecutorObserver _summary;
vespalib::ThreadExecutor & _shared;
vespalib::SequencedTaskExecutorObserver _indexFieldInverter;
vespalib::SequencedTaskExecutorObserver _indexFieldWriter;
@@ -29,7 +29,7 @@ public:
const ThreadServiceObserver &indexObserver() const {
return _index;
}
- const ThreadServiceObserver &summaryObserver() const {
+ const ThreadExecutorObserver &summaryObserver() const {
return _summary;
}
@@ -43,7 +43,7 @@ public:
searchcorespi::index::IThreadService &index() override {
return _index;
}
- searchcorespi::index::IThreadService &summary() override {
+ vespalib::ThreadExecutor &summary() override {
return _summary;
}
vespalib::ThreadExecutor &shared() override {