Skip to content

Commit

Permalink
rm_stm: clear metrics when stopping rm_stm
Browse files Browse the repository at this point in the history
When `rm_stm` is stopped it should release all used resources including
metrics name. This will allow partition to be recreated if required.

Signed-off-by: Michal Maslanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Nov 7, 2023
1 parent da8387e commit 4a82177
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/v/cluster/rm_stm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ ss::future<> rm_stm::stop() {
_log_stats_timer.cancel();
co_await _gate.close();
co_await reset_producers();
_metrics.clear();
co_await persisted_stm<>::stop();
}

Expand Down

0 comments on commit 4a82177

Please sign in to comment.