Skip to content

Commit

Permalink
Merge pull request #8878 from rystsov/issue-8877
Browse files Browse the repository at this point in the history
cluster: send metadata updates to all nodes
  • Loading branch information
rystsov authored Feb 15, 2023
2 parents 30fe679 + 7a3caec commit e314110
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 163 deletions.
1 change: 0 additions & 1 deletion src/v/cluster/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ v_cc_library(
service.cc
metadata_dissemination_handler.cc
metadata_dissemination_service.cc
metadata_dissemination_utils.cc
types.cc
notification_latch.cc
topic_table.cc
Expand Down
19 changes: 5 additions & 14 deletions src/v/cluster/metadata_dissemination_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "cluster/metadata_cache.h"
#include "cluster/metadata_dissemination_rpc_service.h"
#include "cluster/metadata_dissemination_types.h"
#include "cluster/metadata_dissemination_utils.h"
#include "cluster/partition_leaders_table.h"
#include "cluster/partition_manager.h"
#include "cluster/topic_table.h"
Expand Down Expand Up @@ -290,19 +289,11 @@ void metadata_dissemination_service::collect_pending_updates() {
// Partition was removed, skip dissemination
continue;
}
auto non_overlapping = calculate_non_overlapping_nodes(
*assignment, brokers);

/**
* remove current node from non overlapping list, current node may be
* included into non overlapping node when new metadata set is used to
* calculate non overlapping nodes but partition replica still exists on
* current node (it is being moved)
*/
std::erase_if(non_overlapping, [this](model::node_id n) {
return n == _self.id();
});
for (auto& id : non_overlapping) {

for (auto& id : brokers) {
if (id == _self.id()) {
continue;
}
if (!_pending_updates.contains(id)) {
_pending_updates.emplace(
id, update_retry_meta{std::vector<ntp_leader_revision>{}});
Expand Down
43 changes: 0 additions & 43 deletions src/v/cluster/metadata_dissemination_utils.cc

This file was deleted.

26 changes: 0 additions & 26 deletions src/v/cluster/metadata_dissemination_utils.h

This file was deleted.

9 changes: 0 additions & 9 deletions src/v/cluster/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ rp_test(
LABELS cluster
)

rp_test(
UNIT_TEST
BINARY_NAME metadata_dissemination_utils_test
SOURCES metadata_dissemination_utils_test.cc
DEFINITIONS BOOST_TEST_DYN_LINK
LIBRARIES Boost::unit_test_framework v::cluster
LABELS cluster
)

set(srcs
partition_allocator_tests.cc
partition_balancer_planner_test.cc
Expand Down
70 changes: 0 additions & 70 deletions src/v/cluster/tests/metadata_dissemination_utils_test.cc

This file was deleted.

0 comments on commit e314110

Please sign in to comment.