mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 12:36:56 +00:00
db: abstract memtable empty test
This commit is contained in:
@@ -352,7 +352,7 @@ void column_family::add_memtable() {
|
||||
void
|
||||
column_family::seal_active_memtable() {
|
||||
auto old = _memtables->back();
|
||||
if (old->all_partitions().empty()) {
|
||||
if (old->empty()) {
|
||||
return;
|
||||
}
|
||||
add_memtable();
|
||||
|
||||
@@ -30,4 +30,5 @@ public:
|
||||
void apply(const mutation& m);
|
||||
void apply(const frozen_mutation& m);
|
||||
const partitions_type& all_partitions() const;
|
||||
bool empty() const { return partitions.empty(); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user