summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2023-05-08 12:53:11 +0200
committerGitHub <noreply@github.com>2023-05-08 12:53:11 +0200
commit2558a5be5bbcddd4200af59ad4a3095b7e759668 (patch)
tree4957eae0d22a1040f7ba350c6f47bc9c428d82c3 /storage
parent0bb9d136c30602ce61539ed9cfb5be0777e4b1c6 (diff)
parentcdd8a811a50cced472ed639fa3c907e2c03a6432 (diff)
Merge pull request #27015 from vespa-engine/vekterli/add-and-wire-condition-probe-config
Add and wire in condition probing configuration
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/distributor/distributor_stripe_test.cpp19
-rw-r--r--storage/src/vespa/storage/config/distributorconfiguration.cpp1
-rw-r--r--storage/src/vespa/storage/config/stor-distributormanager.def5
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