* 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>
* feat: impl vector index query
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* feat: remove VectorSearchRule and merge it into scan hint rule
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* refactor: vector search hint
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* test: join and subquery
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* fix: clippy when feature disabled
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* fix: push hint only when column is non-nullable or an explicit IS NOT NULL filter exists
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* fix: transformed = true
Co-authored-by: Yingwen <realevenyag@gmail.com>
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* chore: remove adpater vector hint
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* chore: revert transformed
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
---------
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
Co-authored-by: Yingwen <realevenyag@gmail.com>
* feat: impl vector index building
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* feat: supports flat format
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* ci: add vector_index feature to test
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* chore: apply suggestions
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* chore: apply suggestions from copilot
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
---------
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
* chore: describe pods on CI failure
Signed-off-by: WenyXu <wenymedia@gmail.com>
* chore: increase memory limit for main pod template from 2Gi to 3Gi
Signed-off-by: WenyXu <wenymedia@gmail.com>
---------
Signed-off-by: WenyXu <wenymedia@gmail.com>
* feat: add mysql election
* feat: add mysql election
* chore: fix deps
* chore: fix deps
* fix: duplicate container
* fix: duplicate setup for sqlness
* fix: call once
* fix: do not use NOWAIT for mysql 5.7
* chore: apply comments
* fix: no parallel sqlness for mysql
* chore: comments and minor revert
* chore: apply comments
* chore: apply comments
* chore: add to table name
* ci: use 2 metasrv to detect election bugs
* refactor: better election logic
* chore: apply comments
* chore: apply comments
* feat: version check before startup
* feat: init PgElection
fix: release advisory lock
fix: handle duplicate keys
chore: update comments
fix: unlock if acquired the lock
chore: add TODO and avoid unwrap
refactor: check both lock and expire time, add more comments
chore: fmt
fix: deal with multiple edge cases
feat: init PgElection with candidate registration
chore: fmt
chore: remove
* test: add unit test for pg candidate registration
* test: add unit test for pg candidate registration
* chore: update pg env
* chore: make ci happy
* fix: spawn a background connection thread
* chore: typo
* fix: shadow the election client for now
* fix: fix ci
* chore: readability
* chore: follow review comments
* refactor: use kvbackend for pg election
* chore: rename
* chore: make clippy happy
* refactor: use pg server time instead of local ones
* chore: typo
* chore: rename infancy to leader_infancy for clarification
* chore: clean up
* chore: follow review comments
* chore: follow review comments
* ci: unit test should test all features
* ci: fix
* ci: just test pg
* test: add fuzz tests for migrate metric regions
* test: insert values before migrating metric region
* feat: correct table num
* chore: apply suggestions from CR