column_family: Don't retry flushing memtable if shutdown is requested

Since we just keep retrying, this can cause Scylla to not shutdown for
a while.

The data will be safe in the commit log.

Note that this patch doesn't fix the issue when shutdown goes through
storage_service::drain_on_shutdown - more work is required to handle
that case.

Ref #3318.

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
Message-Id: <20180324140822.3743-3-duarte@scylladb.com>
This commit is contained in:
Duarte Nunes
2018-03-24 14:08:22 +00:00
committed by Avi Kivity
parent 50ad37d39b
commit a985ea0fcb

View File

@@ -1073,7 +1073,7 @@ column_family::try_flush_memtable_to_sstable(lw_shared_ptr<memtable> old, sstabl
// If we failed this write we will try the write again and that will create a new flush reader
// that will decrease dirty memory again. So we need to reset the accounting.
old->revert_flushed_memory();
return stop_iteration::no;
return stop_iteration(_async_gate.is_closed());
});
});
});