Skip to content

[BUG] Flash CF option level_compaction_dynamic_level_bytes is reset to default after "flushall" #717

@karthyuom

Description

@karthyuom

Describe the bug
There is a bug where the rocksdb column family (CF) option level_compaction_dynamic_level_bytes, which is set to true inside the keydb code, has been reset back to the default false after the "flushall" command is executed.

To reproduce

  1. Start the keydb server with "flash" enabled
    keydb.conf:

    port 9000
    databases 1
    storage-provider flash /opt/redis/data
    
  2. Populate data from keydb-cli

    127.0.0.1:9000> set k1 v1
    OK

  3. Check the column family option for the column family name "CF 0" in OPTIONS-* file which presents under the flash folder specified above, and the result will look something like this:

    [CFOptions "0"]
    ...
    level_compaction_dynamic_level_bytes=true
    inplace_update_support=false
    table_factory=BlockBasedTable
    
  4. Execute the "flushall" command from keydb-cli

    127.0.0.1:9000> FLUSHALL
    OK

  5. Repeat the step 3, and the result will look something like this:

    [CFOptions "0"]
    ...
    level_compaction_dynamic_level_bytes=false
    inplace_update_support=false
    table_factory=BlockBasedTable
    

Expected behavior

The modified column family options should be applied correctly even after the "flushall".

Additional information

N/A

@paulmchen @hengku @yzhao244

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions