mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-14 12:00:40 +00:00
* test: add fuzz_repartition_metric_table target scaffold Signed-off-by: WenyXu <wenymedia@gmail.com> * test: add metric logical lifecycle in repartition fuzz target Signed-off-by: WenyXu <wenymedia@gmail.com> * test: support partitioned metric tables in repartition fuzz Signed-off-by: WenyXu <wenymedia@gmail.com> * test: add repartition loop and partition assertions for metric target Signed-off-by: WenyXu <wenymedia@gmail.com> * test: use shared timestamp clock in metric repartition writes Signed-off-by: WenyXu <wenymedia@gmail.com> * refactor: unify string value and bound generation for fuzzing Signed-off-by: WenyXu <wenymedia@gmail.com> * test: use fixed physical table name in metric repartition fuzz Signed-off-by: WenyXu <wenymedia@gmail.com> * chore: fmt Signed-off-by: WenyXu <wenymedia@gmail.com> * ci: update ci config Signed-off-by: WenyXu <wenymedia@gmail.com> * refactor: use btreemap Signed-off-by: WenyXu <wenymedia@gmail.com> * print count result Signed-off-by: WenyXu <wenymedia@gmail.com> * test: add csv translator for insert expr Introduce a dedicated top-level csv translator so fuzz insert expressions can be converted into writer-ready records through a structured path instead of ad-hoc formatting in targets. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: add csv dump session utilities Introduce CSV dump env helpers and a session writer that creates run directories, emits seed metadata, and flushes staged CSV records for fuzz workflows. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: bound csv dump buffer with auto flush Parse readable buffer sizes from env and flush staged CSV records automatically when the in-memory threshold is reached to prevent unbounded growth during long fuzz runs. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: flush csv dump before repartition validation Wire csv dump session into the metric repartition fuzz flow so successful inserts are translated from insert expressions into CSV records during write loops and flushed to disk right before row validation. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: keep csv dumps on failure and cleanup on pass Capture run outcomes in metric repartition fuzz, remove dump directories only after successful validation, and retain dump paths on failures so CI and local investigations can use the same artifacts. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: align partial csv records with table headers Keep append payload compact by storing partial insert-expression columns, then expand to full table-context headers at flush time and fill missing values with empty strings. Signed-off-by: WenyXu <wenymedia@gmail.com> * chore: add logs Signed-off-by: WenyXu <wenymedia@gmail.com> * dump csv Signed-off-by: WenyXu <wenymedia@gmail.com> * ci: dump csv Signed-off-by: WenyXu <wenymedia@gmail.com> * refactor Signed-off-by: WenyXu <wenymedia@gmail.com> * test: add table-scoped sql dump writer primitives Signed-off-by: WenyXu <wenymedia@gmail.com> * test: capture table-scoped sql traces after execution Record insert and repartition SQL only after successful execution, include started_at_ms and elapsed_ms in trace comments, and broadcast repartition events into every logical-table trace file for consistent debugging context. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: harden sql trace comments and include create sql Normalize multiline trace comments into valid SQL comment lines and append logical-table CREATE SQL to per-table traces for better timeline reconstruction during repartition debugging. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: dump physical create and repartition SQL traces Signed-off-by: WenyXu <wenymedia@gmail.com> * dump repartition sql Signed-off-by: WenyXu <wenymedia@gmail.com> * test: scaffold writer control channel for barrier flow Add Barrier/Resume/Stop control skeleton and channel wiring in write_loop to prepare per-repartition validation barriers. Also align SQL dump tests with broadcast SQL payload behavior. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: implement writer barrier pause and resume control Make writer control messages effective by pausing writes on barrier, resuming on resume, and stopping via channel signaling so the next commit can enforce deterministic per-repartition validation boundaries. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: validate rows after each repartition barrier Add per-action barrier/ack synchronization with timeout, run immediate logical-table row validation after each repartition, and resume writer only after validation completes to improve minimal failure localization. Signed-off-by: WenyXu <wenymedia@gmail.com> * test: flush dump sessions before per-epoch validation Extract a shared flush-and-snapshot helper and call it before each immediate row validation so CSV/SQL artifacts are persisted at the same epoch boundary being validated. Signed-off-by: WenyXu <wenymedia@gmail.com> * fix: fix unit tests Signed-off-by: WenyXu <wenymedia@gmail.com> * chore: add retry Signed-off-by: WenyXu <wenymedia@gmail.com> * chore: apply suggestions from CR Signed-off-by: WenyXu <wenymedia@gmail.com> --------- Signed-off-by: WenyXu <wenymedia@gmail.com>
166 lines
3.4 KiB
TOML
166 lines
3.4 KiB
TOML
[package]
|
|
name = "tests-fuzz"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[package.metadata]
|
|
cargo-fuzz = true
|
|
|
|
[features]
|
|
default = []
|
|
unstable = ["nix"]
|
|
|
|
[dependencies]
|
|
arbitrary = { version = "1.3.0", features = ["derive"] }
|
|
async-trait = { workspace = true }
|
|
chrono = { workspace = true }
|
|
common-base = { workspace = true }
|
|
common-error = { workspace = true }
|
|
common-macro = { workspace = true }
|
|
common-meta = { workspace = true }
|
|
common-query = { workspace = true }
|
|
common-runtime = { workspace = true }
|
|
common-telemetry = { workspace = true }
|
|
common-time = { workspace = true }
|
|
datatypes = { workspace = true }
|
|
derive_builder = { workspace = true }
|
|
dotenv = "0.15"
|
|
futures = { workspace = true }
|
|
humantime = { workspace = true }
|
|
k8s-openapi = { version = "0.22", features = ["v1_30"] }
|
|
kube = { version = "0.92", features = [
|
|
"runtime",
|
|
"derive",
|
|
"client",
|
|
"admission",
|
|
] }
|
|
lazy_static = { workspace = true }
|
|
libfuzzer-sys = "0.4"
|
|
nix = { version = "0.28", features = ["process", "signal"], optional = true }
|
|
partition = { workspace = true }
|
|
paste.workspace = true
|
|
rand = { workspace = true }
|
|
rand_chacha = "0.9"
|
|
reqwest = { workspace = true }
|
|
schemars = "0.8"
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
serde_yaml = "0.9"
|
|
snafu = { workspace = true }
|
|
sql = { workspace = true }
|
|
sqlparser.workspace = true
|
|
sqlx = { workspace = true, features = [
|
|
"mysql",
|
|
"chrono",
|
|
] }
|
|
store-api = { workspace = true }
|
|
strum.workspace = true
|
|
tinytemplate = "1.2"
|
|
tokio = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
dotenv.workspace = true
|
|
|
|
[[bin]]
|
|
name = "fuzz_create_table"
|
|
path = "targets/ddl/fuzz_create_table.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_create_logical_table"
|
|
path = "targets/ddl/fuzz_create_logical_table.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_insert"
|
|
path = "targets/fuzz_insert.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_insert_logical_table"
|
|
path = "targets/fuzz_insert_logical_table.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_repartition_table"
|
|
path = "targets/ddl/fuzz_repartition_table.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_repartition_metric_table"
|
|
path = "targets/ddl/fuzz_repartition_metric_table.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_alter_table"
|
|
path = "targets/ddl/fuzz_alter_table.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_alter_logical_table"
|
|
path = "targets/ddl/fuzz_alter_logical_table.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_create_database"
|
|
path = "targets/ddl/fuzz_create_database.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "unstable_fuzz_create_table_standalone"
|
|
path = "targets/unstable/fuzz_create_table_standalone.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
required-features = ["unstable"]
|
|
|
|
[[bin]]
|
|
name = "fuzz_failover_mito_regions"
|
|
path = "targets/failover/fuzz_failover_mito_regions.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_failover_metric_regions"
|
|
path = "targets/failover/fuzz_failover_metric_regions.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_migrate_mito_regions"
|
|
path = "targets/migration/fuzz_migrate_mito_regions.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_migrate_metric_regions"
|
|
path = "targets/migration/fuzz_migrate_metric_regions.rs"
|
|
test = false
|
|
bench = false
|
|
doc = false
|