database: add a comment explaining the choice of function in CF stop
We have recently commited a fix to a broken streaming bug that involved reverting column_family::stop() back to calling the custom seal functions explicitly for both memtables and streaming memtables. We here add a comment to explain why that had to be done. Signed-off-by: Glauber Costa <glauber@scylladb.com> Message-Id: <fe94b5883e9c29adc7fc9ee9f498894c057e7b64.1464293167.git.glauber@scylladb.com>
This commit is contained in:
committed by
Avi Kivity
parent
8e124b31aa
commit
30d54cef38
@@ -771,6 +771,12 @@ column_family::start() {
|
||||
|
||||
future<>
|
||||
column_family::stop() {
|
||||
// Please note that in here, we shouldn't use the implicit seal function in each memtable's
|
||||
// list. The reason is that for the streaming memtables, the memtable_list's seal function does
|
||||
// not guarantee anything to be immediately flushed, and will set a timer instead (so we can
|
||||
// coalesce writes). During stop, we need to force flushing behavior so we call
|
||||
// seal_active_streaming_memtable() instead. That problem does not exist for memtables and we
|
||||
// could call _memtables->seal_active_memtable() here. We don't, for consistency with streaming.
|
||||
seal_active_memtable();
|
||||
seal_active_streaming_memtable();
|
||||
return _compaction_manager.remove(this).then([this] {
|
||||
|
||||
Reference in New Issue
Block a user