Skip to content

Commit

Permalink
c/md_dissemination: fixed retrying leadership dissemination
Browse files Browse the repository at this point in the history
After change from `std::vector` to `ss::chunked_fifo` to keep the
updates in metadata dissemination service `update_metadata` we lost
ability to retry metadata dissemination requests as pending updates were
moved to lambda capture list. This way the next retry did not have any
updates to deliver.

Signed-off-by: Michal Maslanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Oct 3, 2023
1 parent 448cb2e commit 2e048dc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/v/cluster/metadata_dissemination_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,19 @@ ss::future<> metadata_dissemination_service::update_leaders_with_health_report(

ss::future<> metadata_dissemination_service::dispatch_one_update(
model::node_id target_id, update_retry_meta& meta) {
// copy updates to make retries possible
ss::chunked_fifo<ntp_leader_revision> updates;
updates.reserve(meta.updates.size());
std::copy(
meta.updates.begin(), meta.updates.end(), std::back_inserter(updates));

return _clients.local()
.with_node_client<metadata_dissemination_rpc_client_protocol>(
_self.id(),
ss::this_shard_id(),
target_id,
_dissemination_interval,
[this, updates = std::move(meta.updates), target_id](
[this, updates = std::move(updates), target_id](
metadata_dissemination_rpc_client_protocol proto) mutable {
vlog(
clusterlog.trace,
Expand Down

0 comments on commit 2e048dc

Please sign in to comment.