diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-02-02 10:24:23 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2024-02-02 10:25:01 +0000 |
commit | 79e9acb16d5e9af719c75110b33d3a180e44665d (patch) | |
tree | e86c31e6150ed42d9f1130444c3eba706ef2d88b /storage | |
parent | 2191193c6e107eb68611ddb106e5f572bea32903 (diff) |
Always sequence mutating operations.
Diffstat (limited to 'storage')
6 files changed, 0 insertions, 60 deletions
diff --git a/storage/src/tests/distributor/distributor_stripe_test.cpp b/storage/src/tests/distributor/distributor_stripe_test.cpp index a10e4ee6a0e..302ed6d2d9b 100644 --- a/storage/src/tests/distributor/distributor_stripe_test.cpp +++ b/storage/src/tests/distributor/distributor_stripe_test.cpp @@ -212,7 +212,6 @@ struct DistributorStripeTest : Test, DistributorStripeTestUtil { } void configureMaxClusterClockSkew(int seconds); - void configure_mutation_sequencing(bool enabled); void configure_merge_busy_inhibit_duration(int seconds); void set_up_and_start_get_op_with_stale_reads_enabled(bool enabled); @@ -674,30 +673,6 @@ auto makeDummyRemoveCommand() { } void -DistributorStripeTest::configure_mutation_sequencing(bool enabled) -{ - ConfigBuilder builder; - builder.sequenceMutatingOperations = enabled; - configure_stripe(builder); -} - -TEST_F(DistributorStripeTest, sequencing_config_is_propagated_to_distributor_config) -{ - setup_stripe(Redundancy(2), NodeCount(2), "storage:2 distributor:1"); - - // Should be enabled by default - EXPECT_TRUE(getConfig().getSequenceMutatingOperations()); - - // Explicitly disabled. - configure_mutation_sequencing(false); - EXPECT_FALSE(getConfig().getSequenceMutatingOperations()); - - // Explicitly enabled. - configure_mutation_sequencing(true); - EXPECT_TRUE(getConfig().getSequenceMutatingOperations()); -} - -void DistributorStripeTest::configure_merge_busy_inhibit_duration(int seconds) { ConfigBuilder builder; diff --git a/storage/src/tests/distributor/externaloperationhandlertest.cpp b/storage/src/tests/distributor/externaloperationhandlertest.cpp index d2c966dcfcf..3fb93d96787 100644 --- a/storage/src/tests/distributor/externaloperationhandlertest.cpp +++ b/storage/src/tests/distributor/externaloperationhandlertest.cpp @@ -482,21 +482,6 @@ TEST_F(ExternalOperationHandlerTest, sequencing_works_across_mutation_types) { ASSERT_NO_FATAL_FAILURE(start_operation_verify_rejected(makeUpdateCommand("testdoctype1", _dummy_id))); } -TEST_F(ExternalOperationHandlerTest, sequencing_can_be_explicitly_config_disabled) { - set_up_distributor_for_sequencing_test(); - - // Should be able to modify config after links have been created, i.e. this is a live config. - auto cfg = make_config(); - cfg->setSequenceMutatingOperations(false); - configure_stripe(cfg); - - Operation::SP generated1; - ASSERT_NO_FATAL_FAILURE(start_operation_verify_not_rejected(makeRemoveCommand(_dummy_id), generated1)); - // Sequencing is disabled, so concurrent op is not rejected. - Operation::SP generated2; - ASSERT_NO_FATAL_FAILURE(start_operation_verify_not_rejected(makeRemoveCommand(_dummy_id), generated2)); -} - TEST_F(ExternalOperationHandlerTest, gets_are_started_with_mutable_db_outside_transition_period) { createLinks(); std::string current = "version:1 distributor:1 storage:3"; diff --git a/storage/src/vespa/storage/config/distributorconfiguration.cpp b/storage/src/vespa/storage/config/distributorconfiguration.cpp index 43d1ba404c9..6949882a2f7 100644 --- a/storage/src/vespa/storage/config/distributorconfiguration.cpp +++ b/storage/src/vespa/storage/config/distributorconfiguration.cpp @@ -38,7 +38,6 @@ DistributorConfiguration::DistributorConfiguration(StorageComponent& component) _enableJoinForSiblingLessBuckets(false), _enableInconsistentJoin(false), _disableBucketActivation(false), - _sequenceMutatingOperations(true), _allowStaleReadsDuringClusterStateTransitions(false), _update_fast_path_restart_enabled(false), _merge_operations_disabled(false), @@ -136,7 +135,6 @@ DistributorConfiguration::configure(const vespa::config::content::core::StorDist _enableInconsistentJoin = config.enableInconsistentJoin; _disableBucketActivation = config.disableBucketActivation; - _sequenceMutatingOperations = config.sequenceMutatingOperations; _allowStaleReadsDuringClusterStateTransitions = config.allowStaleReadsDuringClusterStateTransitions; _update_fast_path_restart_enabled = config.restartWithFastUpdatePathIfAllGetTimestampsAreConsistent; _merge_operations_disabled = config.mergeOperationsDisabled; diff --git a/storage/src/vespa/storage/config/distributorconfiguration.h b/storage/src/vespa/storage/config/distributorconfiguration.h index fd2c47c8f6f..178a966a2a7 100644 --- a/storage/src/vespa/storage/config/distributorconfiguration.h +++ b/storage/src/vespa/storage/config/distributorconfiguration.h @@ -187,13 +187,6 @@ public: return _simulated_db_merging_latency; } - bool getSequenceMutatingOperations() const noexcept { - return _sequenceMutatingOperations; - } - void setSequenceMutatingOperations(bool sequenceMutations) noexcept { - _sequenceMutatingOperations = sequenceMutations; - } - bool allowStaleReadsDuringClusterStateTransitions() const noexcept { return _allowStaleReadsDuringClusterStateTransitions; } @@ -303,7 +296,6 @@ private: bool _enableJoinForSiblingLessBuckets; bool _enableInconsistentJoin; bool _disableBucketActivation; - bool _sequenceMutatingOperations; bool _allowStaleReadsDuringClusterStateTransitions; bool _update_fast_path_restart_enabled; bool _merge_operations_disabled; diff --git a/storage/src/vespa/storage/config/stor-distributormanager.def b/storage/src/vespa/storage/config/stor-distributormanager.def index d586cca56b1..2ff058e2a1b 100644 --- a/storage/src/vespa/storage/config/stor-distributormanager.def +++ b/storage/src/vespa/storage/config/stor-distributormanager.def @@ -95,11 +95,6 @@ disable_bucket_activation bool default=false ## Zero means this mechanism is disabled. max_cluster_clock_skew_sec int default=1 -## If set, a distributor will only allow one active operation per document ID -## for puts, updates and removes. This helps prevent issues caused by concurrent -## modifications to documents when sent from multiple feed clients. -sequence_mutating_operations bool default=true - ## Number of seconds that scheduling of new merge operations should be inhibited ## towards a node if it has indicated that its merge queues are full or it is ## suffering from resource exhaustion. diff --git a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp index 9b7100849be..dba067600a0 100644 --- a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp +++ b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp @@ -236,11 +236,6 @@ ExternalOperationHandler::makeConcurrentMutationRejectionReply(api::StorageComma } bool ExternalOperationHandler::allowMutation(const SequencingHandle& handle) const { - const auto& config(_op_ctx.distributor_config()); - if (!config.getSequenceMutatingOperations()) { - // Sequencing explicitly disabled, so always allow. - return true; - } return handle.valid(); } |