aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/tests/distributor
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-02-02 15:12:23 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2024-02-02 15:57:27 +0000
commite9f0300f44d589878160061bc440071554629e0f (patch)
tree2cc47efc87ffdab2066291a5d10bfb3816b2cb3f /storage/src/tests/distributor
parent4817b124a56a225a08ceeb4e1e9e352d51793aa7 (diff)
two_phase_garbage_collection is always enabled
Diffstat (limited to 'storage/src/tests/distributor')
-rw-r--r--storage/src/tests/distributor/distributor_stripe_test.cpp19
-rw-r--r--storage/src/tests/distributor/garbagecollectiontest.cpp17
2 files changed, 0 insertions, 36 deletions
diff --git a/storage/src/tests/distributor/distributor_stripe_test.cpp b/storage/src/tests/distributor/distributor_stripe_test.cpp
index 4568447a28d..2fb65c9d46d 100644
--- a/storage/src/tests/distributor/distributor_stripe_test.cpp
+++ b/storage/src/tests/distributor/distributor_stripe_test.cpp
@@ -174,12 +174,6 @@ struct DistributorStripeTest : Test, DistributorStripeTestUtil {
});
}
- void configure_enable_two_phase_garbage_collection(bool use_two_phase) {
- configure_stripe_with([&](auto& builder) {
- builder.enableTwoPhaseGarbageCollection = use_two_phase;
- });
- }
-
void configure_enable_condition_probing(bool enable_probing) {
configure_stripe_with([&](auto& builder) {
builder.enableConditionProbing = enable_probing;
@@ -949,19 +943,6 @@ TEST_F(DistributorStripeTest, closing_aborts_gets_started_outside_stripe_thread)
EXPECT_EQ(api::ReturnCode::ABORTED, _sender.reply(0)->getResult().getResult());
}
-TEST_F(DistributorStripeTest, enable_two_phase_gc_config_is_propagated_to_internal_config)
-{
- setup_stripe(Redundancy(1), NodeCount(1), "distributor:1 storage:1");
-
- EXPECT_TRUE(getConfig().enable_two_phase_garbage_collection());
-
- configure_enable_two_phase_garbage_collection(true);
- EXPECT_TRUE(getConfig().enable_two_phase_garbage_collection());
-
- configure_enable_two_phase_garbage_collection(false);
- 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");
diff --git a/storage/src/tests/distributor/garbagecollectiontest.cpp b/storage/src/tests/distributor/garbagecollectiontest.cpp
index bd80b9b447a..b28a2ab3d33 100644
--- a/storage/src/tests/distributor/garbagecollectiontest.cpp
+++ b/storage/src/tests/distributor/garbagecollectiontest.cpp
@@ -60,14 +60,6 @@ struct GarbageCollectionOperationTest : Test, DistributorStripeTestUtil {
with_two_phase.two_phase_remove_location = true;
set_node_supported_features(0, with_two_phase);
set_node_supported_features(1, with_two_phase);
-
- config_enable_two_phase_gc(true);
- }
-
- void config_enable_two_phase_gc(bool enabled) {
- auto config = make_config();
- config->set_enable_two_phase_garbage_collection(enabled);
- configure_stripe(std::move(config));
}
std::shared_ptr<GarbageCollectionOperation> create_op() {
@@ -235,8 +227,6 @@ TEST_F(GarbageCollectionOperationTest, two_phase_gc_requires_config_enabling_and
with_two_phase.two_phase_remove_location = true;
set_node_supported_features(1, with_two_phase);
- config_enable_two_phase_gc(true);
-
// Config enabled, but only 1 node says it supports two-phase RemoveLocation
auto op = create_op();
op->start(_sender);
@@ -247,13 +237,6 @@ TEST_F(GarbageCollectionOperationTest, two_phase_gc_requires_config_enabling_and
op = create_op();
op->start(_sender);
EXPECT_TRUE(op->is_two_phase());
-
- // But doesn't matter if two-phase GC is config-disabled
- config_enable_two_phase_gc(false);
-
- op = create_op();
- op->start(_sender);
- EXPECT_FALSE(op->is_two_phase());
}
TEST_F(GarbageCollectionOperationTest, first_phase_sends_enumerate_only_remove_locations_with_provided_gc_pri) {