Details
Description
During my testing of MyRocks I discovered that setting the variable Rocksdb_force_flush_memtable_now to any value, including 'OFF' would force a flush.
mysql> show global variables like 'Rocksdb_force_flush_memtable_now'; +----------------------------------+-------+ | Variable_name | Value | +----------------------------------+-------+ | rocksdb_force_flush_memtable_now | OFF | +----------------------------------+-------+ 1 row in set (0.00 sec)mysql> show global status like 'rocksdb_memtable_un%'; +----------------------------+---------+ | Variable_name | Value | +----------------------------+---------+ | rocksdb_memtable_unflushed | 4684360 | +----------------------------+---------+ 1 row in set (0.00 sec)mysql> set global Rocksdb_force_flush_memtable_now = 'OFF'; Query OK, 0 rows affected (0.45 sec)mysql> show global status like 'rocksdb_memtable_un%'; +----------------------------+-------+ | Variable_name | Value | +----------------------------+-------+ | rocksdb_memtable_unflushed | 5048 | +----------------------------+-------+ 1 row in set (0.00 sec)
It's highly unlikely that this will cause a problem in actual production use, but there should probably be validation of the value prior to executing a flush to make sure this is not something the user has done accidentally in this type of edge case.