summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-02-02 08:35:48 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2024-02-02 08:35:48 +0000
commit5f6538f5f02daa9f219be195cd02f3c58d8b016d (patch)
tree3597f5e116046ad90469dffc3043a89e6a9e01ef /storage
parentfdff9a2b553d2c3c0c81aca3bd8bb6d9a491e443 (diff)
Never block statecheckers
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/distributor/idealstatemanagertest.cpp27
-rw-r--r--storage/src/vespa/storage/config/distributorconfiguration.cpp5
-rw-r--r--storage/src/vespa/storage/config/distributorconfiguration.h10
-rw-r--r--storage/src/vespa/storage/config/stor-distributormanager.def12
-rw-r--r--storage/src/vespa/storage/distributor/idealstatemanager.cpp9
5 files changed, 2 insertions, 61 deletions
diff --git a/storage/src/tests/distributor/idealstatemanagertest.cpp b/storage/src/tests/distributor/idealstatemanagertest.cpp
index fbcc188a5da..0cadaa3fc9f 100644
--- a/storage/src/tests/distributor/idealstatemanagertest.cpp
+++ b/storage/src/tests/distributor/idealstatemanagertest.cpp
@@ -94,33 +94,6 @@ TEST_F(IdealStateManagerTest, status_page) {
ost.str());
}
-TEST_F(IdealStateManagerTest, disabled_state_checker) {
- setup_stripe(1, 1, "distributor:1 storage:1");
-
- auto cfg = make_config();
- cfg->setSplitSize(100);
- cfg->setSplitCount(1000000);
- cfg->disableStateChecker("SplitBucket");
- configure_stripe(cfg);
-
- insertBucketInfo(document::BucketId(16, 5), 0, 0xff, 100, 200, true, true);
- insertBucketInfo(document::BucketId(16, 2), 0, 0xff, 10, 10, true, true);
-
- std::ostringstream ost;
- getIdealStateManager().getBucketStatus(ost);
-
- EXPECT_EQ(makeBucketStatusString(
- "BucketId(0x4000000000000002) : [node(idx=0,crc=0xff,docs=10/10,bytes=10/10,trusted=true,active=true,ready=false)]<br>\n"
- "<b>BucketId(0x4000000000000005):</b> <i> : split: [Splitting bucket because its maximum size (200 b, 100 docs, 100 meta, 200 b total) is "
- "higher than the configured limit of (100, 1000000)]</i> [node(idx=0,crc=0xff,docs=100/100,bytes=200/200,trusted=true,"
- "active=true,ready=false)]<br>\n"),
- ost.str());
-
- tick();
- EXPECT_EQ("", active_ideal_state_operations());
-
-}
-
TEST_F(IdealStateManagerTest, clear_active_on_node_down) {
setSystemState(lib::ClusterState("distributor:1 storage:3"));
for (int i = 1; i < 4; i++) {
diff --git a/storage/src/vespa/storage/config/distributorconfiguration.cpp b/storage/src/vespa/storage/config/distributorconfiguration.cpp
index 83be5d71b23..b4eabc9bfb9 100644
--- a/storage/src/vespa/storage/config/distributorconfiguration.cpp
+++ b/storage/src/vespa/storage/config/distributorconfiguration.cpp
@@ -154,11 +154,6 @@ DistributorConfiguration::configure(const vespa::config::content::core::StorDist
_garbageCollectionInterval = vespalib::duration::zero();
}
- _blockedStateCheckers.clear();
- for (uint32_t i = 0; i < config.blockedstatecheckers.size(); ++i) {
- _blockedStateCheckers.insert(config.blockedstatecheckers[i]);
- }
-
_doInlineSplit = config.inlinebucketsplitting;
_enableJoinForSiblingLessBuckets = config.enableJoinForSiblingLessBuckets;
_enableInconsistentJoin = config.enableInconsistentJoin;
diff --git a/storage/src/vespa/storage/config/distributorconfiguration.h b/storage/src/vespa/storage/config/distributorconfiguration.h
index 9d879fa62d5..7fbe42db123 100644
--- a/storage/src/vespa/storage/config/distributorconfiguration.h
+++ b/storage/src/vespa/storage/config/distributorconfiguration.h
@@ -58,14 +58,6 @@ public:
_lastGarbageCollectionChange = lastChangeTime;
}
- bool stateCheckerIsActive(vespalib::stringref stateCheckerName) const {
- return _blockedStateCheckers.find(stateCheckerName) == _blockedStateCheckers.end();
- }
-
- void disableStateChecker(vespalib::stringref stateCheckerName) {
- _blockedStateCheckers.insert(stateCheckerName);
- }
-
void setDoInlineSplit(bool value) {
_doInlineSplit = value;
}
@@ -326,8 +318,6 @@ private:
uint32_t _minPendingMaintenanceOps;
uint32_t _maxPendingMaintenanceOps;
- vespalib::hash_set<vespalib::string> _blockedStateCheckers;
-
uint32_t _maxVisitorsPerNodePerClientVisitor;
uint32_t _minBucketsPerVisitor;
diff --git a/storage/src/vespa/storage/config/stor-distributormanager.def b/storage/src/vespa/storage/config/stor-distributormanager.def
index 8c4f1d5bb17..9107647d491 100644
--- a/storage/src/vespa/storage/config/stor-distributormanager.def
+++ b/storage/src/vespa/storage/config/stor-distributormanager.def
@@ -39,18 +39,6 @@ garbagecollection.interval int default=0
## If false, dont do splits inline with feeding.
inlinebucketsplitting bool default=true
-## List of state checkers (ideal state generators) that should be ignored in the cluster.
-## One or more of the following (case insensitive):
-##
-## SynchronizeAndMove
-## DeleteExtraCopies
-## JoinBuckets
-## SplitBucket
-## SplitInconsistentBuckets
-## SetBucketState
-## GarbageCollection
-blockedstatecheckers[] string restart
-
## Maximum nodes involved in a merge operation. Currently, this can not be more
## than 16 nodes due to protocol limitations. However, decreasing the max may
## be useful if 16 node merges ends up too expensive.
diff --git a/storage/src/vespa/storage/distributor/idealstatemanager.cpp b/storage/src/vespa/storage/distributor/idealstatemanager.cpp
index 65e036282d3..0f5d0e48f5a 100644
--- a/storage/src/vespa/storage/distributor/idealstatemanager.cpp
+++ b/storage/src/vespa/storage/distributor/idealstatemanager.cpp
@@ -71,11 +71,6 @@ IdealStateManager::runStateCheckers(const StateChecker::Context& c) const
// We go through _all_ active state checkers so that statistics can be
// collected across all checkers, not just the ones that are highest pri.
for (const auto & checker : _stateCheckers) {
- if (!operation_context().distributor_config().stateCheckerIsActive(checker->getName())) {
- LOG(spam, "Skipping state checker %s", checker->getName());
- continue;
- }
-
auto result = checker->check(c);
if (canOverwriteResult(highestPri, result)) {
highestPri = std::move(result);
@@ -146,7 +141,7 @@ IdealStateManager::generateInterceptingSplit(BucketSpace bucketSpace, const Buck
c.set_entry(e);
IdealStateOperation::UP operation(_splitBucketStateChecker->check(c).createOperation());
- if (operation.get()) {
+ if (operation) {
operation->setPriority(pri);
operation->setIdealStateManager(this);
}
@@ -159,7 +154,7 @@ IdealStateManager::generate(const document::Bucket& bucket) const
{
NodeMaintenanceStatsTracker statsTracker;
IdealStateOperation::SP op(generateHighestPriority(bucket, statsTracker).createOperation());
- if (op.get()) {
+ if (op) {
op->setIdealStateManager(const_cast<IdealStateManager*>(this));
}
return op;