aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-04-20 18:13:08 +0200
committerGitHub <noreply@github.com>2022-04-20 18:13:08 +0200
commit1a719f9c5f5eebdd9502a3d813d1da15453c71e1 (patch)
tree73bfa31352889624aea45dfb1e4135ba825747c0 /searchcore
parentd852a539468eb3ea10549caa7238ba66ba60d586 (diff)
parentd6fd192f0310d054aabf8131df4f4ee13f98f393 (diff)
Merge pull request #22178 from vespa-engine/geirst/cleanup-dynamic-throttling-shared-field-writer-feature-flags
Cleanup use of dynamic throttling and shared field writer feature flags
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/config/proton.def8
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.h3
3 files changed, 10 insertions, 5 deletions
diff --git a/searchcore/src/vespa/searchcore/config/proton.def b/searchcore/src/vespa/searchcore/config/proton.def
index 808535924f1..51536299d51 100644
--- a/searchcore/src/vespa/searchcore/config/proton.def
+++ b/searchcore/src/vespa/searchcore/config/proton.def
@@ -138,7 +138,7 @@ indexing.optimize enum {LATENCY, THROUGHPUT, ADAPTIVE} default=THROUGHPUT restar
## Maximum number of pending operations for each of the internal
## indexing threads. Only used when visibility delay is zero.
-indexing.tasklimit int default=1000
+indexing.tasklimit int default=-1000
## Deprecated and ignored, will soon go away
indexing.semiunboundtasklimit int default = 1000
@@ -514,14 +514,14 @@ feeding.concurrency double default = 0.2 restart
## DOCUMENT_DB: Use a shared executor for index field inverter, index field writer, and attribute field writer among all document dbs.
##
## TODO: Remove this when a shared executor is the default.
-feeding.shared_field_writer_executor enum {NONE, INDEX, INDEX_AND_ATTRIBUTE, DOCUMENT_DB} default = NONE restart
+feeding.shared_field_writer_executor enum {NONE, INDEX, INDEX_AND_ATTRIBUTE, DOCUMENT_DB} default = DOCUMENT_DB restart
## Maximum number of pending tasks for the master thread in each document db.
##
## This limit is only considered when executing tasks for handling external feed operations.
## In that case the calling thread (persistence thread) is blocked until the master thread has capacity to handle more tasks.
## When this limit is set to 0 it is ignored.
-feeding.master_task_limit int default = 1000
+feeding.master_task_limit int default = 0
## Adjustment to resource limit when determining if maintenance jobs can run.
##
@@ -550,7 +550,7 @@ forward_issues bool default = true
## Chooses the throttling policy used to control the window size
## of the SharedOperationThrottler component used by the transaction log replay feed state.
-replay_throttling_policy.type enum { UNLIMITED, DYNAMIC } default=UNLIMITED
+replay_throttling_policy.type enum { UNLIMITED, DYNAMIC } default=DYNAMIC
## Only used if replay_throttling_policy.type == DYNAMIC:
replay_throttling_policy.min_window_size int default=100
replay_throttling_policy.max_window_size int default=10000
diff --git a/searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.cpp b/searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.cpp
index e5d42b34370..e25c1459300 100644
--- a/searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.cpp
+++ b/searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.cpp
@@ -1,6 +1,9 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "mock_shared_threading_service.h"
+#include <vespa/vespalib/util/sequencedtaskexecutor.h>
+
+VESPA_THREAD_STACK_TAG(mock_field_writer_executor)
namespace proton {
@@ -9,6 +12,7 @@ MockSharedThreadingService::MockSharedThreadingService(ThreadExecutor& warmup_in
size_t num_bucket_executors)
: _warmup(warmup_in),
_shared(shared_in),
+ _field_writer(vespalib::SequencedTaskExecutor::create(mock_field_writer_executor, 1)),
_invokeService(10ms),
_transport(),
_bucket_executor(num_bucket_executors),
diff --git a/searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.h b/searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.h
index 167d15d70eb..00ffdc92020 100644
--- a/searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.h
+++ b/searchcore/src/vespa/searchcore/proton/test/mock_shared_threading_service.h
@@ -14,6 +14,7 @@ private:
using ThreadExecutor = vespalib::ThreadExecutor;
ThreadExecutor & _warmup;
ThreadExecutor & _shared;
+ std::unique_ptr<vespalib::ISequencedTaskExecutor> _field_writer;
vespalib::InvokeServiceImpl _invokeService;
Transport _transport;
storage::spi::dummy::DummyBucketExecutor _bucket_executor;
@@ -25,7 +26,7 @@ public:
~MockSharedThreadingService() override;
ThreadExecutor& warmup() override { return _warmup; }
ThreadExecutor& shared() override { return _shared; }
- vespalib::ISequencedTaskExecutor* field_writer() override { return nullptr; }
+ vespalib::ISequencedTaskExecutor* field_writer() override { return _field_writer.get(); }
vespalib::InvokeService & invokeService() override { return _invokeService; }
FNET_Transport & transport() override { return _transport.transport(); }
storage::spi::BucketExecutor& bucket_executor() override { return _bucket_executor; }