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>
(cherry picked from commit 4a82177)
  • Loading branch information
mmaslankaprv committed Nov 27, 2023
1 parent 9d630ba commit 8d8ef01
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 @@ -1189,6 +1189,7 @@ ss::future<result<kafka_result>> rm_stm::do_replicate(
ss::future<> rm_stm::stop() {
auto_abort_timer.cancel();
_log_stats_timer.cancel();
_metrics.clear();
return raft::state_machine::stop();
}

Expand Down

0 comments on commit 8d8ef01

Please sign in to comment.