Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v24.1.x] [CORE-5632] cluster: Reset cloud storage metric in the cluster::partition::remove_persistent_state #21620

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/v/cloud_storage/read_path_probes.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class partition_probe {
uint64_t get_records_read() const noexcept { return _records_read; }
uint64_t get_chunk_size() const noexcept { return _chunk_size; }

void clear_metrics() { _metrics.clear(); }

private:
// Number of bytes that partition reader have received
uint64_t _bytes_read = 0;
Expand Down
1 change: 1 addition & 0 deletions src/v/cluster/partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ partition::get_cloud_term_last_offset(model::term_id term) const {
}

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

Expand Down
Loading