mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 21:47:10 +00:00
replica: Add storage_group::memtable_count()
Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
This commit is contained in:
@@ -175,6 +175,8 @@ public:
|
||||
|
||||
const dht::token_range& token_range() const noexcept;
|
||||
|
||||
size_t memtable_count() const noexcept;
|
||||
|
||||
compaction_group_ptr& main_compaction_group() noexcept;
|
||||
|
||||
utils::small_vector<compaction_group*, 3> compaction_groups() noexcept;
|
||||
|
||||
@@ -2024,6 +2024,11 @@ size_t compaction_group::memtable_count() const noexcept {
|
||||
return _memtables->size();
|
||||
}
|
||||
|
||||
size_t storage_group::memtable_count() const noexcept {
|
||||
auto memtable_count = [] (const compaction_group_ptr& cg) { return cg ? cg->memtable_count() : 0; };
|
||||
return memtable_count(_main_cg);
|
||||
}
|
||||
|
||||
future<> table::flush(std::optional<db::replay_position> pos) {
|
||||
if (pos && *pos < _flush_rp) {
|
||||
co_return;
|
||||
|
||||
Reference in New Issue
Block a user