diff options
author | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2019-05-14 15:15:11 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2019-05-14 15:15:11 +0000 |
commit | 99487b06f0d9d4761947c1e1f49b2618a4ce2f4e (patch) | |
tree | 7a3aef14d60a3a4322bc54cf624b5af8e3abe687 /storage | |
parent | a732a80addac50740cb253877d6e74d322dabc82 (diff) |
Disable bucket DB pruning elision optimization for now
There may be a currently unknown edge case where some valid edges do not
trigger pruning as they should, so disable optimization entirely until
we know for sure.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/tests/distributor/bucket_db_prune_elision_test.cpp | 3 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/bucketdbupdater.cpp | 12 |
2 files changed, 4 insertions, 11 deletions
diff --git a/storage/src/tests/distributor/bucket_db_prune_elision_test.cpp b/storage/src/tests/distributor/bucket_db_prune_elision_test.cpp index 4821d05a90c..c4f7aa3fd8d 100644 --- a/storage/src/tests/distributor/bucket_db_prune_elision_test.cpp +++ b/storage/src/tests/distributor/bucket_db_prune_elision_test.cpp @@ -83,6 +83,9 @@ TEST(IdempotentStateTransitionTest, changed_storage_node_state_disallows_elision EXPECT_FALSE(db_pruning_may_be_elided(state_of("distributor:3 storage:3 .0.s:d"), state_of("distributor:3 storage:3 .1.s:d"))); + + EXPECT_FALSE(db_pruning_may_be_elided(state_of("distributor:3 storage:3 .0.s:r"), + state_of("distributor:3 storage:3 .0.s:d"))); } TEST(IdempotentStateTransitionTest, may_elide_for_transition_between_different_effective_storage_down_states) { diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp index d5c16bc7f5b..5482696b945 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp +++ b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp @@ -121,7 +121,7 @@ BucketDBUpdater::recheckBucketInfo(uint32_t nodeIdx, void BucketDBUpdater::removeSuperfluousBuckets( const lib::ClusterStateBundle& newState, - bool is_distribution_config_change) + [[maybe_unused]] bool is_distribution_config_change) { const bool move_to_read_only_db = shouldDeferStateEnabling(); const char* up_states = _distributorComponent.getDistributor().getStorageNodeUpStates(); @@ -130,16 +130,6 @@ BucketDBUpdater::removeSuperfluousBuckets( const auto& oldClusterState(elem.second->getClusterState()); const auto& new_cluster_state = newState.getDerivedClusterState(elem.first); - // Running a full DB sweep is expensive, so if the cluster state transition does - // not actually indicate that buckets should possibly be removed, we elide it entirely. - if (!is_distribution_config_change - && db_pruning_may_be_elided(oldClusterState, *new_cluster_state, up_states)) - { - LOG(debug, "Eliding DB pruning for state transition '%s' -> '%s'", - oldClusterState.toString().c_str(), new_cluster_state->toString().c_str()); - continue; - } - auto& bucketDb(elem.second->getBucketDatabase()); auto& readOnlyDb(_distributorComponent.getReadOnlyBucketSpaceRepo().get(elem.first).getBucketDatabase()); |