diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-05-08 09:46:36 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-05-08 09:46:36 +0000 |
commit | cdd8a811a50cced472ed639fa3c907e2c03a6432 (patch) | |
tree | 01ecc7086404934f0c8460e40ae7f2c2e62a9e14 /storage/src | |
parent | 005d0b28426912fb7c77fb29ad2760f41112e3f4 (diff) |
Add and wire in condition probing configuration
Diffstat (limited to 'storage/src')
3 files changed, 25 insertions, 0 deletions
diff --git a/storage/src/tests/distributor/distributor_stripe_test.cpp b/storage/src/tests/distributor/distributor_stripe_test.cpp index 73ff0f22614..2130c6ae62d 100644 --- a/storage/src/tests/distributor/distributor_stripe_test.cpp +++ b/storage/src/tests/distributor/distributor_stripe_test.cpp @@ -197,6 +197,12 @@ struct DistributorStripeTest : Test, DistributorStripeTestUtil { configure_stripe(builder); } + void configure_enable_condition_probing(bool enable_probing) { + ConfigBuilder builder; + builder.enableConditionProbing = enable_probing; + configure_stripe(builder); + } + bool scheduler_has_implicitly_clear_priority_on_schedule_set() const noexcept { return _stripe->_scheduler->implicitly_clear_priority_on_schedule(); } @@ -1031,4 +1037,17 @@ TEST_F(DistributorStripeTest, enable_two_phase_gc_config_is_propagated_to_intern EXPECT_FALSE(getConfig().enable_two_phase_garbage_collection()); } +TEST_F(DistributorStripeTest, enable_condition_probing_config_is_propagated_to_internal_config) +{ + setup_stripe(Redundancy(1), NodeCount(1), "distributor:1 storage:1"); + + EXPECT_FALSE(getConfig().enable_condition_probing()); + + configure_enable_condition_probing(true); + EXPECT_TRUE(getConfig().enable_condition_probing()); + + configure_enable_condition_probing(false); + EXPECT_FALSE(getConfig().enable_condition_probing()); +} + } diff --git a/storage/src/vespa/storage/config/distributorconfiguration.cpp b/storage/src/vespa/storage/config/distributorconfiguration.cpp index c6e3ebb7087..d6d21c89b68 100644 --- a/storage/src/vespa/storage/config/distributorconfiguration.cpp +++ b/storage/src/vespa/storage/config/distributorconfiguration.cpp @@ -178,6 +178,7 @@ DistributorConfiguration::configure(const vespa::config::content::core::StorDist _use_unordered_merge_chaining = config.useUnorderedMergeChaining; _inhibit_default_merges_when_global_merges_pending = config.inhibitDefaultMergesWhenGlobalMergesPending; _enable_two_phase_garbage_collection = config.enableTwoPhaseGarbageCollection; + _enable_condition_probing = config.enableConditionProbing; _minimumReplicaCountingMode = config.minimumReplicaCountingMode; diff --git a/storage/src/vespa/storage/config/stor-distributormanager.def b/storage/src/vespa/storage/config/stor-distributormanager.def index 17ab56f69de..fb0cd4f21d0 100644 --- a/storage/src/vespa/storage/config/stor-distributormanager.def +++ b/storage/src/vespa/storage/config/stor-distributormanager.def @@ -307,3 +307,8 @@ inhibit_default_merges_when_global_merges_pending bool default=true ## Two-phase GC is only used iff all replica content nodes support the feature AND it's enabled ## by this config. enable_two_phase_garbage_collection bool default=true + +## If true, a conditional Put or Remove operation received for a bucket with inconsistent +## replicas will trigger an implicit distributed condition probe to resolve the outcome of +## the condition across all divergent replicas. +enable_condition_probing bool default=false |