Skip to content

Commit

Permalink
c/pbb: reshedule tick immediately when topic table was modified
Browse files Browse the repository at this point in the history
If topic table was modified during iterating over topics in partition
balancer planner the `partition_balancer_backend` tick should be
rescheduled immediately.

Fixes: redpanda-data#11999

Signed-off-by: Michal Maslanka <michal@redpanda.com>
(cherry picked from commit 30474ec)
  • Loading branch information
mmaslankaprv authored and vbotbuildovich committed Aug 31, 2023
1 parent 0f28eb9 commit 78808ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/v/cluster/partition_balancer_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "config/property.h"
#include "random/generators.h"
#include "utils/gate_guard.h"
#include "utils/stable_iterator_adaptor.h"

#include <seastar/core/coroutine.hh>

Expand Down Expand Up @@ -255,6 +256,13 @@ void partition_balancer_backend::tick() {
e.what());
maybe_rearm_timer(true);
})
.handle_exception_type([this](iterator_stability_violation& e) {
vlog(
clusterlog.debug,
"iterator_stability_violation: {}, rescheduling tick",
e.what());
maybe_rearm_timer(true);
})
.handle_exception([](const std::exception_ptr& e) {
vlog(clusterlog.warn, "tick error: {}", e);
});
Expand Down

0 comments on commit 78808ca

Please sign in to comment.