diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-02-02 10:41:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-02 10:41:46 +0100 |
commit | 01462be91c91f11d75b7f836f6edc72e6029ff0c (patch) | |
tree | bddf2805bb564be665871e8be4aae0003d98190d /storage | |
parent | 8ec478ac18d15e477c54300e5fd5b3ca269fa40a (diff) | |
parent | 5f6538f5f02daa9f219be195cd02f3c58d8b016d (diff) |
Merge pull request #30135 from vespa-engine/balder/never-block-state-checkers
Never block statecheckers
Diffstat (limited to 'storage')
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 350116ca2a5..321bea634a4 100644 --- a/storage/src/vespa/storage/config/distributorconfiguration.cpp +++ b/storage/src/vespa/storage/config/distributorconfiguration.cpp @@ -153,11 +153,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 7bb035345cb..dbdb5afe929 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; } @@ -319,8 +311,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 117c76d132c..de7ac80a19f 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; |