From bb54b052a5fe9a47cc6269204eb345510592e78d Mon Sep 17 00:00:00 2001 From: lucasliang Date: Thu, 4 Jan 2024 17:27:27 +0800 Subject: [PATCH 1/2] rewrite: optimize the interval of `sync` when rewriting memtables. (#347) In a cloud environment, refraining from unscheduling sync operations when rewriting memtables might result in an accumulation of unsynced bytes in the buffer. This accumulation has the potential to impede the foreground write progress during sync. This pull request introduces periodic sync operations when the amount of stashed unsynced bytes exceeds a predefined threshold. This optimization aims to address the issue and enhance performance. Signed-off-by: lucasliang From 70a1b47232d8acf7b15a129a2a47403296d1885f Mon Sep 17 00:00:00 2001 From: lucasliang Date: Tue, 3 Dec 2024 15:43:54 +0800 Subject: [PATCH 2/2] CP #372 to fix build errs. Signed-off-by: lucasliang --- Cargo.toml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4f6f4846..cb1ccd22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,8 +42,11 @@ hex = "0.4" if_chain = "1.0" lazy_static = "1.3" libc = "0.2" -log = { version = "0.4", features = ["max_level_trace", "release_max_level_debug"] } -lz4-sys = "1.9" +log = { version = "0.4", features = [ + "max_level_trace", + "release_max_level_debug", +] } +lz4-sys = { version = "=1.9.5" } memmap2 = { version = "0.9", optional = true } nix = "0.26" num-derive = "0.4" @@ -55,7 +58,7 @@ protobuf = "2" rayon = "1.5" rhai = { version = "1.7", features = ["sync"], optional = true } scopeguard = "1.1" -serde = { version = "1.0", features = ["derive"] } +serde = { version = "=1.0.194", features = ["derive"] } serde_repr = "0.1" strum = { version = "0.25.0", features = ["derive"] } thiserror = "1.0" @@ -64,8 +67,12 @@ thiserror = "1.0" criterion = "0.4" ctor = "0.2" env_logger = "0.10" -kvproto = { git = "https://github.com/pingcap/kvproto.git", default-features = false, features = ["protobuf-codec"] } -raft = { git = "https://github.com/tikv/raft-rs", branch = "master", default-features = false, features = ["protobuf-codec"] } +kvproto = { git = "https://github.com/pingcap/kvproto.git", default-features = false, features = [ + "protobuf-codec", +] } +raft = { git = "https://github.com/tikv/raft-rs", branch = "master", default-features = false, features = [ + "protobuf-codec", +] } rand = "0.8" rand_distr = "0.4" tempfile = "3.6" @@ -74,19 +81,10 @@ toml = "0.8" [features] default = ["internals", "scripting"] internals = [] -nightly = [ - "prometheus/nightly", -] -failpoints = [ - "fail/failpoints", -] -scripting = [ - "rhai", -] -swap = [ - "nightly", - "memmap2", -] +nightly = ["prometheus/nightly"] +failpoints = ["fail/failpoints"] +scripting = ["rhai"] +swap = ["nightly", "memmap2"] std_fs = [] nightly_group = ["nightly", "swap"] @@ -95,6 +93,8 @@ nightly_group = ["nightly", "swap"] raft-proto = { git = "https://github.com/tikv/raft-rs", branch = "master" } protobuf = { git = "https://github.com/pingcap/rust-protobuf", branch = "v2.8" } protobuf-codegen = { git = "https://github.com/pingcap/rust-protobuf", branch = "v2.8" } +# Lock the version of cc-rs to avoid build failure on MacOS, ref https://github.com/rust-lang/cc-rs/issues/984. +cc = { git = "https://github.com/rust-lang/cc-rs", tag = "1.0.98" } [workspace] members = ["stress", "ctl"]