horaedb
horaedb copied to clipboard
fix: disable layered memtable in overwrite mode
Rationale
Layered memtable is only designed for append mode table now, and it shouldn't be used in overwrite mode table.
Detailed Changes
- Make default values in config used.
- Add
enable
field to control layered memtable's on/off. - Add check to prevent invalid options during table create/alter.
- Add related it cases.
Test Plan
Test manually.
Following cases are considered:
Check and intercept the invalid table options during table create/alter
- enable layered memtable but mutable switch threshold is 0
- enable layered memtable for overwrite mode table
Table options new field layered_enable
's default value when it is not found in pb
- false, when whole
layered_memtable_options
not exist - false, when
layered_memtable_options
exist, andmutable_segment_switch_threshold
== 0 - true, when
layered_memtable_options
exist, andmutable_segment_switch_threshold
> 0