Skip to content

Commit

Permalink
cluster: Reset cloud storage metric...
Browse files Browse the repository at this point in the history
... in the partition::remove_persistent state. The probe has access to
the global state so it's not safe to keep it after the partition is
stopped and `remove_persistent_state` method is invoked. In cases when
the partition is recreated with different revision id the 'double metric
registration' error could be triggered.
  • Loading branch information
Lazin committed Jul 23, 2024
1 parent ed9f1b8 commit 52fb95a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/v/cluster/partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ partition::get_cloud_term_last_offset(model::term_id term) const {
}

ss::future<> partition::remove_persistent_state() {
_cloud_storage_probe = nullptr;
co_await _raft->stm_manager()->remove_local_state();
}

Expand Down

0 comments on commit 52fb95a

Please sign in to comment.