From a21d3357c36fd321872367d43ec6b8fc85235fbe Mon Sep 17 00:00:00 2001 From: Aleksandra Martyniuk Date: Wed, 19 Jul 2023 14:02:14 +0200 Subject: [PATCH] replica: pass tables_metadata to phased_barrier_top_10_counts --- replica/database.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/replica/database.cc b/replica/database.cc index 787ebfe126..6da0b7bc13 100644 --- a/replica/database.cc +++ b/replica/database.cc @@ -144,7 +144,7 @@ public: }; const boost::container::static_vector>, 10> -phased_barrier_top_10_counts(const std::unordered_map>& tables, std::function op_count_getter) { +phased_barrier_top_10_counts(const database::tables_metadata& tables_metadata, std::function op_count_getter) { using table_list = boost::container::static_vector; using count_and_tables = std::pair; const auto less = [] (const count_and_tables& a, const count_and_tables& b) { @@ -154,7 +154,7 @@ phased_barrier_top_10_counts(const std::unordered_map res; count_and_tables* min_element = nullptr; - for (const auto& [tid, table] : tables) { + for (const auto& [tid, table] : tables_metadata._column_families) { const auto count = op_count_getter(*table); if (!count) { continue; @@ -272,7 +272,7 @@ void database::setup_scylla_memory_diagnostics_producer() { for (const auto& [name, op_count_getter] : phased_barriers) { writeln(" {} (top 10):\n", name); auto total = 0; - for (const auto& [count, table_list] : phased_barrier_top_10_counts(_tables_metadata._column_families, op_count_getter)) { + for (const auto& [count, table_list] : phased_barrier_top_10_counts(_tables_metadata, op_count_getter)) { total += count; writeln(" {}", count); if (table_list.empty()) {