Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable layered memtable in overwrite mode #1533

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

Rachelint
Copy link
Contributor

@Rachelint Rachelint commented May 23, 2024

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, and mutable_segment_switch_threshold == 0
  • true, when layered_memtable_options exist, and mutable_segment_switch_threshold > 0

@github-actions github-actions bot added the bug Something isn't working label May 23, 2024
@Rachelint Rachelint force-pushed the disable-layered-memtable-in-overwrite-mode branch from e97033b to a9c4041 Compare May 27, 2024 09:32
@Rachelint Rachelint force-pushed the disable-layered-memtable-in-overwrite-mode branch from 71a7944 to bf1115a Compare May 27, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants