diff --git a/database.cc b/database.cc index 040c633415..e3b5c1210e 100644 --- a/database.cc +++ b/database.cc @@ -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(); diff --git a/memtable.hh b/memtable.hh index eb1c3bcd6e..2af7fefb75 100644 --- a/memtable.hh +++ b/memtable.hh @@ -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(); } };