database: immediately flush tables with no memtables.
If a table has no data, it may still take a long time to flush. This is because before we even try to flush, we need go acquire a permit and that can take a while if there is a long running flush already queued. We can special case the situation in which there is no data in any of the memtables owned by table and return immediately. Signed-off-by: Glauber Costa <glauber@scylladb.com>
This commit is contained in:
@@ -1282,7 +1282,7 @@ future<> dirty_memory_manager::shutdown() {
|
||||
}
|
||||
|
||||
future<> memtable_list::request_flush() {
|
||||
if (!may_flush()) {
|
||||
if (empty() || !may_flush()) {
|
||||
return make_ready_future<>();
|
||||
} else if (!_flush_coalescing) {
|
||||
_flush_coalescing = shared_promise<>();
|
||||
|
||||
Reference in New Issue
Block a user