Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-5438

MyRocks - Setting Rocksdb_force_flush_memtable_now to any value causes a flush

    Details

    • Type: Bug
    • Status: On Hold
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 5.7.25-28, 8.0.13-4
    • Fix Version/s: None
    • Component/s: MyRocks
    • Labels:
    • Environment:

      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.

       

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Sylvester Peter Sylvester
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: