summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-02-10 17:15:59 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-02-10 17:15:59 +0000
commitc641d46cc27beabaecdf2e8dc357d3d40040e08b (patch)
tree2c94a45b9a11100469ae3e9c247074c10fed68dc /searchcore
parentea87741d28b855e9882e64c083ca5db845bb603f (diff)
Wire in configuration for bucket move job
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/config/proton.def6
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_filter_config.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.h10
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.cpp70
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.h98
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp30
9 files changed, 144 insertions, 102 deletions
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index 8c6115abf07..e47dfac90db 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -416,7 +416,8 @@ public:
_mcCfg->getAttributeUsageFilterConfig(),
_mcCfg->getAttributeUsageSampleInterval(),
_mcCfg->getBlockableJobConfig(),
- _mcCfg->getFlushConfig());
+ _mcCfg->getFlushConfig(),
+ _mcCfg->getBucketMoveConfig());
_mcCfg = newCfg;
forwardMaintenanceConfig();
}
@@ -433,7 +434,8 @@ public:
_mcCfg->getAttributeUsageFilterConfig(),
_mcCfg->getAttributeUsageSampleInterval(),
_mcCfg->getBlockableJobConfig(),
- _mcCfg->getFlushConfig());
+ _mcCfg->getFlushConfig(),
+ _mcCfg->getBucketMoveConfig());
_mcCfg = newCfg;
forwardMaintenanceConfig();
}
@@ -450,7 +452,8 @@ public:
_mcCfg->getAttributeUsageFilterConfig(),
_mcCfg->getAttributeUsageSampleInterval(),
_mcCfg->getBlockableJobConfig(),
- _mcCfg->getFlushConfig());
+ _mcCfg->getFlushConfig(),
+ _mcCfg->getBucketMoveConfig());
_mcCfg = newCfg;
forwardMaintenanceConfig();
}
@@ -465,7 +468,8 @@ public:
_mcCfg->getAttributeUsageFilterConfig(),
_mcCfg->getAttributeUsageSampleInterval(),
_mcCfg->getBlockableJobConfig(),
- _mcCfg->getFlushConfig());
+ _mcCfg->getFlushConfig(),
+ _mcCfg->getBucketMoveConfig());
_mcCfg = newCfg;
forwardMaintenanceConfig();
}
diff --git a/searchcore/src/vespa/searchcore/config/proton.def b/searchcore/src/vespa/searchcore/config/proton.def
index fb845982d74..a634ccd0a78 100644
--- a/searchcore/src/vespa/searchcore/config/proton.def
+++ b/searchcore/src/vespa/searchcore/config/proton.def
@@ -403,6 +403,12 @@ lidspacecompaction.removeblockrate double default=100.0
## Set to true to enable bucket locking via content layer
lidspacecompaction.usebucketexecutor bool default=false
+## Maximum docs to move in single operation per bucket
+bucketmove.maxdocstomoveperbucket int default=1
+
+## Set to true to enable bucket locking via content layer
+bucketmove.usebucketexecutor bool default=false
+
## This is the maximum value visibilitydelay you can have.
## A to higher value here will cost more memory while not improving too much.
maxvisibilitydelay double default=1.0
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_filter_config.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_filter_config.h
index e2cea7f4860..66f85191a0e 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_filter_config.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_filter_config.h
@@ -17,18 +17,18 @@ struct AttributeUsageFilterConfig
double _enumStoreLimit;
double _multiValueLimit;
- AttributeUsageFilterConfig()
+ AttributeUsageFilterConfig() noexcept
: _enumStoreLimit(1.0),
_multiValueLimit(1.0)
{ }
AttributeUsageFilterConfig(double enumStoreLimit_in,
- double multiValueLimit_in)
+ double multiValueLimit_in) noexcept
: _enumStoreLimit(enumStoreLimit_in),
_multiValueLimit(multiValueLimit_in)
{ }
- bool operator==(const AttributeUsageFilterConfig &rhs) const {
+ bool operator==(const AttributeUsageFilterConfig &rhs) const noexcept {
return ((_enumStoreLimit == rhs._enumStoreLimit) &&
(_multiValueLimit == rhs._multiValueLimit));
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.cpp b/searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.cpp
index d11b8ee397d..7973ebe857d 100644
--- a/searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.cpp
@@ -3,21 +3,22 @@
namespace proton {
-DocumentDBFlushConfig::DocumentDBFlushConfig()
+DocumentDBFlushConfig::DocumentDBFlushConfig() noexcept
: DocumentDBFlushConfig(2, 20)
{
}
-DocumentDBFlushConfig::DocumentDBFlushConfig(uint32_t maxFlushed, uint32_t maxFlushedRetired)
+DocumentDBFlushConfig::DocumentDBFlushConfig(uint32_t maxFlushed, uint32_t maxFlushedRetired) noexcept
: _maxFlushed(maxFlushed),
_maxFlushedRetired(maxFlushedRetired)
{
}
bool
-DocumentDBFlushConfig::operator==(const DocumentDBFlushConfig &rhs) const
+DocumentDBFlushConfig::operator==(const DocumentDBFlushConfig &rhs) const noexcept
{
- return _maxFlushed == rhs._maxFlushed &&
+ return
+ _maxFlushed == rhs._maxFlushed &&
_maxFlushedRetired == rhs._maxFlushedRetired;
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.h b/searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.h
index 438b2b13759..6bcbb271224 100644
--- a/searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.h
+++ b/searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.h
@@ -13,11 +13,11 @@ class DocumentDBFlushConfig {
uint32_t _maxFlushedRetired;
public:
- DocumentDBFlushConfig();
- DocumentDBFlushConfig(uint32_t maxFlushed, uint32_t maxFlushedRetired);
- bool operator==(const DocumentDBFlushConfig &rhs) const;
- uint32_t getMaxFlushed() const { return _maxFlushed; }
- uint32_t getMaxFlushedRetired() const { return _maxFlushedRetired; }
+ DocumentDBFlushConfig() noexcept;
+ DocumentDBFlushConfig(uint32_t maxFlushed, uint32_t maxFlushedRetired) noexcept;
+ bool operator==(const DocumentDBFlushConfig &rhs) const noexcept;
+ uint32_t getMaxFlushed() const noexcept { return _maxFlushed; }
+ uint32_t getMaxFlushedRetired() const noexcept { return _maxFlushedRetired; }
};
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.cpp b/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.cpp
index 2f41ca83a74..f3b0c3ff305 100644
--- a/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.cpp
@@ -6,8 +6,7 @@ namespace proton {
constexpr vespalib::duration MAX_DELAY_SEC = 300s;
-DocumentDBPruneConfig::
-DocumentDBPruneConfig()
+DocumentDBPruneConfig::DocumentDBPruneConfig() noexcept
: _delay(MAX_DELAY_SEC),
_interval(21600s),
_age(1209600s)
@@ -15,7 +14,7 @@ DocumentDBPruneConfig()
}
DocumentDBPruneConfig::
-DocumentDBPruneConfig(vespalib::duration interval, vespalib::duration age)
+DocumentDBPruneConfig(vespalib::duration interval, vespalib::duration age) noexcept
: _delay(std::min(MAX_DELAY_SEC, interval)),
_interval(interval),
_age(age)
@@ -23,32 +22,30 @@ DocumentDBPruneConfig(vespalib::duration interval, vespalib::duration age)
}
bool
-DocumentDBPruneConfig::
-operator==(const DocumentDBPruneConfig &rhs) const
+DocumentDBPruneConfig::operator==(const DocumentDBPruneConfig &rhs) const noexcept
{
return _delay == rhs._delay &&
_interval == rhs._interval &&
_age == rhs._age;
}
-DocumentDBHeartBeatConfig::DocumentDBHeartBeatConfig()
+DocumentDBHeartBeatConfig::DocumentDBHeartBeatConfig() noexcept
: _interval(60s)
{
}
-DocumentDBHeartBeatConfig::DocumentDBHeartBeatConfig(vespalib::duration interval)
+DocumentDBHeartBeatConfig::DocumentDBHeartBeatConfig(vespalib::duration interval) noexcept
: _interval(interval)
{
}
bool
-DocumentDBHeartBeatConfig::
-operator==(const DocumentDBHeartBeatConfig &rhs) const
+DocumentDBHeartBeatConfig::operator==(const DocumentDBHeartBeatConfig &rhs) const noexcept
{
return _interval == rhs._interval;
}
-DocumentDBLidSpaceCompactionConfig::DocumentDBLidSpaceCompactionConfig()
+DocumentDBLidSpaceCompactionConfig::DocumentDBLidSpaceCompactionConfig() noexcept
: _delay(MAX_DELAY_SEC),
_interval(3600s),
_allowedLidBloat(1000000000),
@@ -66,7 +63,7 @@ DocumentDBLidSpaceCompactionConfig::DocumentDBLidSpaceCompactionConfig(vespalib:
double remove_batch_block_rate,
double remove_block_rate,
bool disabled,
- bool useBucketExecutor)
+ bool useBucketExecutor) noexcept
: _delay(std::min(MAX_DELAY_SEC, interval)),
_interval(interval),
_allowedLidBloat(allowedLidBloat),
@@ -79,7 +76,7 @@ DocumentDBLidSpaceCompactionConfig::DocumentDBLidSpaceCompactionConfig(vespalib:
}
DocumentDBLidSpaceCompactionConfig
-DocumentDBLidSpaceCompactionConfig::createDisabled()
+DocumentDBLidSpaceCompactionConfig::createDisabled() noexcept
{
DocumentDBLidSpaceCompactionConfig result;
result._disabled = true;
@@ -87,7 +84,7 @@ DocumentDBLidSpaceCompactionConfig::createDisabled()
}
bool
-DocumentDBLidSpaceCompactionConfig::operator==(const DocumentDBLidSpaceCompactionConfig &rhs) const
+DocumentDBLidSpaceCompactionConfig::operator==(const DocumentDBLidSpaceCompactionConfig &rhs) const noexcept
{
return _delay == rhs._delay &&
_interval == rhs._interval &&
@@ -97,25 +94,41 @@ DocumentDBLidSpaceCompactionConfig::operator==(const DocumentDBLidSpaceCompactio
}
-BlockableMaintenanceJobConfig::BlockableMaintenanceJobConfig()
+BlockableMaintenanceJobConfig::BlockableMaintenanceJobConfig() noexcept
: _resourceLimitFactor(1.0),
_maxOutstandingMoveOps(10)
{}
BlockableMaintenanceJobConfig::BlockableMaintenanceJobConfig(double resourceLimitFactor,
- uint32_t maxOutstandingMoveOps)
+ uint32_t maxOutstandingMoveOps) noexcept
: _resourceLimitFactor(resourceLimitFactor),
_maxOutstandingMoveOps(maxOutstandingMoveOps)
{}
bool
-BlockableMaintenanceJobConfig::operator==(const BlockableMaintenanceJobConfig &rhs) const
+BlockableMaintenanceJobConfig::operator==(const BlockableMaintenanceJobConfig &rhs) const noexcept
{
return _resourceLimitFactor == rhs._resourceLimitFactor &&
_maxOutstandingMoveOps == rhs._maxOutstandingMoveOps;
}
-DocumentDBMaintenanceConfig::DocumentDBMaintenanceConfig()
+BucketMoveConfig::BucketMoveConfig() noexcept
+ : _maxDocsToMovePerBucket(1),
+ _useBucketExecutor(false)
+{}
+BucketMoveConfig::BucketMoveConfig(uint32_t maxDocsToMovePerBucket, bool useBucketExecutor_) noexcept
+ : _maxDocsToMovePerBucket(maxDocsToMovePerBucket),
+ _useBucketExecutor(useBucketExecutor_)
+{}
+
+bool
+BucketMoveConfig::operator==(const BucketMoveConfig &rhs) const noexcept
+{
+ return _maxDocsToMovePerBucket == rhs._maxDocsToMovePerBucket &&
+ _useBucketExecutor == rhs._useBucketExecutor;
+}
+
+DocumentDBMaintenanceConfig::DocumentDBMaintenanceConfig() noexcept
: _pruneRemovedDocuments(),
_heartBeat(),
_sessionCachePruneInterval(900s),
@@ -124,9 +137,9 @@ DocumentDBMaintenanceConfig::DocumentDBMaintenanceConfig()
_attributeUsageFilterConfig(),
_attributeUsageSampleInterval(60s),
_blockableJobConfig(),
- _flushConfig()
-{
-}
+ _flushConfig(),
+ _bucketMoveConfig()
+{ }
DocumentDBMaintenanceConfig::~DocumentDBMaintenanceConfig() = default;
@@ -139,7 +152,8 @@ DocumentDBMaintenanceConfig(const DocumentDBPruneRemovedDocumentsConfig &pruneRe
const AttributeUsageFilterConfig &attributeUsageFilterConfig,
vespalib::duration attributeUsageSampleInterval,
const BlockableMaintenanceJobConfig &blockableJobConfig,
- const DocumentDBFlushConfig &flushConfig)
+ const DocumentDBFlushConfig &flushConfig,
+ const BucketMoveConfig & bucketMoveconfig) noexcept
: _pruneRemovedDocuments(pruneRemovedDocuments),
_heartBeat(heartBeat),
_sessionCachePruneInterval(groupingSessionPruneInterval),
@@ -148,15 +162,16 @@ DocumentDBMaintenanceConfig(const DocumentDBPruneRemovedDocumentsConfig &pruneRe
_attributeUsageFilterConfig(attributeUsageFilterConfig),
_attributeUsageSampleInterval(attributeUsageSampleInterval),
_blockableJobConfig(blockableJobConfig),
- _flushConfig(flushConfig)
-{
-}
+ _flushConfig(flushConfig),
+ _bucketMoveConfig(bucketMoveconfig)
+{ }
bool
DocumentDBMaintenanceConfig::
-operator==(const DocumentDBMaintenanceConfig &rhs) const
+operator==(const DocumentDBMaintenanceConfig &rhs) const noexcept
{
- return _pruneRemovedDocuments == rhs._pruneRemovedDocuments &&
+ return
+ _pruneRemovedDocuments == rhs._pruneRemovedDocuments &&
_heartBeat == rhs._heartBeat &&
_sessionCachePruneInterval == rhs._sessionCachePruneInterval &&
_visibilityDelay == rhs._visibilityDelay &&
@@ -164,7 +179,8 @@ operator==(const DocumentDBMaintenanceConfig &rhs) const
_attributeUsageFilterConfig == rhs._attributeUsageFilterConfig &&
_attributeUsageSampleInterval == rhs._attributeUsageSampleInterval &&
_blockableJobConfig == rhs._blockableJobConfig &&
- _flushConfig == rhs._flushConfig;
+ _flushConfig == rhs._flushConfig &&
+ _bucketMoveConfig == rhs._bucketMoveConfig;
}
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.h b/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.h
index 9bdb8fa0ae6..d1552178180 100644
--- a/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.h
+++ b/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.h
@@ -16,13 +16,13 @@ private:
vespalib::duration _age;
public:
- DocumentDBPruneConfig();
- DocumentDBPruneConfig(vespalib::duration interval, vespalib::duration age);
+ DocumentDBPruneConfig() noexcept;
+ DocumentDBPruneConfig(vespalib::duration interval, vespalib::duration age) noexcept;
- bool operator==(const DocumentDBPruneConfig &rhs) const;
- vespalib::duration getDelay() const { return _delay; }
- vespalib::duration getInterval() const { return _interval; }
- vespalib::duration getAge() const { return _age; }
+ bool operator==(const DocumentDBPruneConfig &rhs) const noexcept;
+ vespalib::duration getDelay() const noexcept { return _delay; }
+ vespalib::duration getInterval() const noexcept { return _interval; }
+ vespalib::duration getAge() const noexcept { return _age; }
};
typedef DocumentDBPruneConfig DocumentDBPruneRemovedDocumentsConfig;
@@ -33,11 +33,11 @@ private:
vespalib::duration _interval;
public:
- DocumentDBHeartBeatConfig();
- DocumentDBHeartBeatConfig(vespalib::duration interval);
+ DocumentDBHeartBeatConfig() noexcept;
+ DocumentDBHeartBeatConfig(vespalib::duration interval) noexcept;
- bool operator==(const DocumentDBHeartBeatConfig &rhs) const;
- vespalib::duration getInterval() const { return _interval; }
+ bool operator==(const DocumentDBHeartBeatConfig &rhs) const noexcept;
+ vespalib::duration getInterval() const noexcept { return _interval; }
};
class DocumentDBLidSpaceCompactionConfig
@@ -53,39 +53,51 @@ private:
bool _useBucketExecutor;
public:
- DocumentDBLidSpaceCompactionConfig();
+ DocumentDBLidSpaceCompactionConfig() noexcept;
DocumentDBLidSpaceCompactionConfig(vespalib::duration interval,
uint32_t allowedLidBloat,
double allowwedLidBloatFactor,
double remove_batch_block_rate,
double remove_block_rate,
bool disabled,
- bool useBucketExecutor);
-
- static DocumentDBLidSpaceCompactionConfig createDisabled();
- bool operator==(const DocumentDBLidSpaceCompactionConfig &rhs) const;
- vespalib::duration getDelay() const { return _delay; }
- vespalib::duration getInterval() const { return _interval; }
- uint32_t getAllowedLidBloat() const { return _allowedLidBloat; }
- double getAllowedLidBloatFactor() const { return _allowedLidBloatFactor; }
- double get_remove_batch_block_rate() const { return _remove_batch_block_rate; }
- double get_remove_block_rate() const { return _remove_block_rate; }
- bool isDisabled() const { return _disabled; }
- bool useBucketExecutor() const { return _useBucketExecutor; }
+ bool useBucketExecutor) noexcept;
+
+ static DocumentDBLidSpaceCompactionConfig createDisabled() noexcept;
+ bool operator==(const DocumentDBLidSpaceCompactionConfig &rhs) const noexcept;
+ vespalib::duration getDelay() const noexcept { return _delay; }
+ vespalib::duration getInterval() const noexcept { return _interval; }
+ uint32_t getAllowedLidBloat() const noexcept { return _allowedLidBloat; }
+ double getAllowedLidBloatFactor() const noexcept { return _allowedLidBloatFactor; }
+ double get_remove_batch_block_rate() const noexcept { return _remove_batch_block_rate; }
+ double get_remove_block_rate() const noexcept { return _remove_block_rate; }
+ bool isDisabled() const noexcept { return _disabled; }
+ bool useBucketExecutor() const noexcept { return _useBucketExecutor; }
};
class BlockableMaintenanceJobConfig {
private:
- double _resourceLimitFactor;
+ double _resourceLimitFactor;
uint32_t _maxOutstandingMoveOps;
public:
- BlockableMaintenanceJobConfig();
+ BlockableMaintenanceJobConfig() noexcept;
BlockableMaintenanceJobConfig(double resourceLimitFactor,
- uint32_t maxOutstandingMoveOps);
- bool operator==(const BlockableMaintenanceJobConfig &rhs) const;
- double getResourceLimitFactor() const { return _resourceLimitFactor; }
- uint32_t getMaxOutstandingMoveOps() const { return _maxOutstandingMoveOps; }
+ uint32_t maxOutstandingMoveOps) noexcept;
+ bool operator==(const BlockableMaintenanceJobConfig &rhs) const noexcept;
+ double getResourceLimitFactor() const noexcept { return _resourceLimitFactor; }
+ uint32_t getMaxOutstandingMoveOps() const noexcept { return _maxOutstandingMoveOps; }
+};
+
+class BucketMoveConfig {
+public:
+ BucketMoveConfig() noexcept;
+ BucketMoveConfig(uint32_t _maxDocsToMovePerBucket, bool useBucketExecutor) noexcept;
+ bool operator==(const BucketMoveConfig &rhs) const noexcept;
+ uint32_t getMaxDocsToMovePerBucket() const noexcept { return _maxDocsToMovePerBucket; }
+ bool useBucketExecutor() const noexcept { return _useBucketExecutor; }
+private:
+ uint32_t _maxDocsToMovePerBucket;
+ bool _useBucketExecutor;
};
class DocumentDBMaintenanceConfig
@@ -103,9 +115,10 @@ private:
vespalib::duration _attributeUsageSampleInterval;
BlockableMaintenanceJobConfig _blockableJobConfig;
DocumentDBFlushConfig _flushConfig;
+ BucketMoveConfig _bucketMoveConfig;
public:
- DocumentDBMaintenanceConfig();
+ DocumentDBMaintenanceConfig() noexcept;
DocumentDBMaintenanceConfig(const DocumentDBPruneRemovedDocumentsConfig &pruneRemovedDocuments,
const DocumentDBHeartBeatConfig &heartBeat,
vespalib::duration sessionCachePruneInterval,
@@ -114,7 +127,8 @@ public:
const AttributeUsageFilterConfig &attributeUsageFilterConfig,
vespalib::duration attributeUsageSampleInterval,
const BlockableMaintenanceJobConfig &blockableJobConfig,
- const DocumentDBFlushConfig &flushConfig);
+ const DocumentDBFlushConfig &flushConfig,
+ const BucketMoveConfig & bucketMoveconfig) noexcept;
DocumentDBMaintenanceConfig(const DocumentDBMaintenanceConfig &) = delete;
DocumentDBMaintenanceConfig & operator = (const DocumentDBMaintenanceConfig &) = delete;
@@ -122,32 +136,32 @@ public:
bool
- operator==(const DocumentDBMaintenanceConfig &rhs) const;
+ operator==(const DocumentDBMaintenanceConfig &rhs) const noexcept ;
- const DocumentDBPruneRemovedDocumentsConfig &getPruneRemovedDocumentsConfig() const {
+ const DocumentDBPruneRemovedDocumentsConfig &getPruneRemovedDocumentsConfig() const noexcept {
return _pruneRemovedDocuments;
}
- const DocumentDBHeartBeatConfig &getHeartBeatConfig() const {
+ const DocumentDBHeartBeatConfig &getHeartBeatConfig() const noexcept {
return _heartBeat;
}
- vespalib::duration getSessionCachePruneInterval() const {
+ vespalib::duration getSessionCachePruneInterval() const noexcept {
return _sessionCachePruneInterval;
}
- vespalib::duration getVisibilityDelay() const { return _visibilityDelay; }
- const DocumentDBLidSpaceCompactionConfig &getLidSpaceCompactionConfig() const {
+ vespalib::duration getVisibilityDelay() const noexcept { return _visibilityDelay; }
+ const DocumentDBLidSpaceCompactionConfig &getLidSpaceCompactionConfig() const noexcept {
return _lidSpaceCompaction;
}
- const AttributeUsageFilterConfig &getAttributeUsageFilterConfig() const {
+ const AttributeUsageFilterConfig &getAttributeUsageFilterConfig() const noexcept {
return _attributeUsageFilterConfig;
}
- vespalib::duration getAttributeUsageSampleInterval() const {
+ vespalib::duration getAttributeUsageSampleInterval() const noexcept {
return _attributeUsageSampleInterval;
}
- const BlockableMaintenanceJobConfig &getBlockableJobConfig() const {
+ const BlockableMaintenanceJobConfig &getBlockableJobConfig() const noexcept {
return _blockableJobConfig;
}
- const DocumentDBFlushConfig &getFlushConfig() const { return _flushConfig; }
+ const DocumentDBFlushConfig &getFlushConfig() const noexcept { return _flushConfig; }
+ const BucketMoveConfig & getBucketMoveConfig() const noexcept { return _bucketMoveConfig; }
};
} // namespace proton
-
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
index f5a594d2f36..2c9249c0049 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
@@ -152,9 +152,8 @@ buildMaintenanceConfig(const BootstrapConfig::SP &bootstrapConfig,
BlockableMaintenanceJobConfig(
proton.maintenancejobs.resourcelimitfactor,
proton.maintenancejobs.maxoutstandingmoveops),
- DocumentDBFlushConfig(
- proton.index.maxflushed,
- proton.index.maxflushedretired));
+ DocumentDBFlushConfig(proton.index.maxflushed,proton.index.maxflushedretired),
+ BucketMoveConfig(proton.bucketmove.maxdocstomoveperbucket, proton.bucketmove.usebucketexecutor));
}
template<typename T>
diff --git a/searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp b/searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp
index dc9b02c9e5f..c8429984b1f 100644
--- a/searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp
@@ -63,6 +63,7 @@ injectLidSpaceCompactionJobs(MaintenanceController &controller,
void
injectBucketMoveJob(MaintenanceController &controller,
+ const DocumentDBMaintenanceConfig &config,
IFrozenBucketHandler &fbHandler,
bucketdb::IBucketCreateNotifier &bucketCreateNotifier,
const vespalib::string &docTypeName,
@@ -73,8 +74,7 @@ injectBucketMoveJob(MaintenanceController &controller,
IBucketStateChangedNotifier &bucketStateChangedNotifier,
const std::shared_ptr<IBucketStateCalculator> &calc,
DocumentDBJobTrackers &jobTrackers,
- IDiskMemUsageNotifier &diskMemUsageNotifier,
- const BlockableMaintenanceJobConfig &blockableConfig)
+ IDiskMemUsageNotifier &diskMemUsageNotifier)
{
auto bmj = std::make_unique<BucketMoveJob>(calc,
moveHandler,
@@ -86,7 +86,7 @@ injectBucketMoveJob(MaintenanceController &controller,
clusterStateChangedNotifier,
bucketStateChangedNotifier,
diskMemUsageNotifier,
- blockableConfig,
+ config.getBlockableJobConfig(),
docTypeName, bucketSpace);
controller.registerJobInMasterThread(trackJob(jobTrackers.getBucketMove(), std::move(bmj)));
}
@@ -121,26 +121,28 @@ MaintenanceJobsInjector::injectJobs(MaintenanceController &controller,
{
controller.registerJobInMasterThread(std::make_unique<HeartBeatJob>(hbHandler, config.getHeartBeatConfig()));
controller.registerJobInDefaultPool(std::make_unique<PruneSessionCacheJob>(scPruner, config.getSessionCachePruneInterval()));
+
const MaintenanceDocumentSubDB &mRemSubDB(controller.getRemSubDB());
auto pruneRDjob = std::make_unique<PruneRemovedDocumentsJob>(config.getPruneRemovedDocumentsConfig(), *mRemSubDB.meta_store(),
mRemSubDB.sub_db_id(), docTypeName, prdHandler, fbHandler);
controller.registerJobInMasterThread(trackJob(jobTrackers.getRemovedDocumentsPrune(), std::move(pruneRDjob)));
+
if (!config.getLidSpaceCompactionConfig().isDisabled()) {
injectLidSpaceCompactionJobs(controller, config, bucketExecutor, lscHandlers, opStorer, fbHandler,
jobTrackers.getLidSpaceCompact(), diskMemUsageNotifier,
clusterStateChangedNotifier, calc, bucketSpace);
}
- injectBucketMoveJob(controller, fbHandler, bucketCreateNotifier, docTypeName, bucketSpace, moveHandler, bucketModifiedHandler,
- clusterStateChangedNotifier, bucketStateChangedNotifier, calc, jobTrackers,
- diskMemUsageNotifier, config.getBlockableJobConfig());
- controller.registerJobInMasterThread(std::make_unique<SampleAttributeUsageJob>
- (readyAttributeManager,
- notReadyAttributeManager,
- attributeUsageFilter,
- docTypeName,
- config.getAttributeUsageSampleInterval(),
- std::move(attribute_config_inspector),
- transient_memory_usage_provider));
+
+ injectBucketMoveJob(controller, config, fbHandler, bucketCreateNotifier, docTypeName, bucketSpace, moveHandler,
+ bucketModifiedHandler, clusterStateChangedNotifier, bucketStateChangedNotifier, calc,
+ jobTrackers, diskMemUsageNotifier);
+
+ controller.registerJobInMasterThread(
+ std::make_unique<SampleAttributeUsageJob>(readyAttributeManager, notReadyAttributeManager,
+ attributeUsageFilter, docTypeName,
+ config.getAttributeUsageSampleInterval(),
+ std::move(attribute_config_inspector),
+ transient_memory_usage_provider));
}
} // namespace proton