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
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5ee88c6
disable layered memtable in overwrite mode.
Rachelint May 23, 2024
6c154a8
make layered memtable disable default.
Rachelint May 23, 2024
167cddf
add layered's options in show create, modify its default value, and a…
Rachelint May 24, 2024
578ba7e
remove the unnecessary checks.
Rachelint May 24, 2024
bb6562f
update it results.
Rachelint May 24, 2024
453d8d6
add case for create table with invalid options.
Rachelint May 24, 2024
7a2562e
complete tests.
Rachelint May 24, 2024
e895c29
reset test cases for cluster mode.
Rachelint May 24, 2024
4df1e7c
fix create table case for local mode.
Rachelint May 24, 2024
8a3ac49
add alter case for layered memtable options check.
Rachelint May 24, 2024
61658a6
fix clippy.
Rachelint May 24, 2024
7d7e7af
remove unnecessary config.
Rachelint May 24, 2024
390718f
fix comment.
Rachelint May 24, 2024
1558ffd
return reason when options are invalid.
Rachelint May 24, 2024
14452aa
fix style.
Rachelint May 24, 2024
9cadf32
update TableOptions pb.
Rachelint May 27, 2024
a9c4041
update check logic of layered memtable enabling.
Rachelint May 27, 2024
8057329
add compatibility logic during convert table opts pb to table opts.
Rachelint May 27, 2024
bf1115a
update it results.
Rachelint May 27, 2024
8454986
modify TableOptions related displays.
Rachelint May 27, 2024
0702f7d
fix clippy.
Rachelint May 27, 2024
44655d6
use disable in pb to impl enable default true.
Rachelint May 27, 2024
1f2ea70
fix comment.
Rachelint May 27, 2024
c400aea
fix style.
Rachelint May 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/analytic_engine/src/memtable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub struct LayeredMemtableOptions {
impl Default for LayeredMemtableOptions {
fn default() -> Self {
Self {
mutable_segment_switch_threshold: ReadableSize::mb(3),
mutable_segment_switch_threshold: ReadableSize::mb(0),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/analytic_engine/src/table/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ impl TableData {
.mutable_segment_switch_threshold
.0 as usize;
let enable_layered_memtable = mutable_segment_switch_threshold > 0;
let memtable_factory = if enable_layered_memtable {
let memtable_factory = if enable_layered_memtable && !opts.need_dedup() {
Rachelint marked this conversation as resolved.
Show resolved Hide resolved
Arc::new(LayeredMemtableFactory::new(
memtable_factory,
mutable_segment_switch_threshold,
Expand Down Expand Up @@ -409,7 +409,7 @@ impl TableData {
.mutable_segment_switch_threshold
.0 as usize;
let enable_layered_memtable = mutable_segment_switch_threshold > 0;
let memtable_factory = if enable_layered_memtable {
let memtable_factory = if enable_layered_memtable && !add_meta.opts.need_dedup() {
Arc::new(LayeredMemtableFactory::new(
memtable_factory,
mutable_segment_switch_threshold,
Expand Down
Loading