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

MyRocks - Setting Rocksdb_force_flush_memtable_now to any value causes a flush

Details

    • Bug
    • Status: On Hold
    • Medium
    • Resolution: Unresolved
    • 8.0.13-4, 5.7.25-28
    • None
    • MyRocks

    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.

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:

              Smart Checklist