Commit Graph

5347 Commits

Author SHA1 Message Date
discord9
59d7b4899c some sidenote
Signed-off-by: discord9 <discord9@163.com>
2026-04-16 17:00:11 +08:00
discord9
b04e35ff62 rephrase
Signed-off-by: discord9 <discord9@163.com>
2026-04-16 16:57:47 +08:00
discord9
2775832022 docs: first ver
Signed-off-by: discord9 <discord9@163.com>
2026-04-16 11:49:26 +08:00
dennis zhuang
51bf63e0c2 docs: update project status (#7976)
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-04-16 01:45:20 +00:00
discord9
44b2d9b3a4 docs: rfc for remote dyn filter (#7931)
* docs: remote dyn filter rfc

Signed-off-by: discord9 <discord9@163.com>

* per review

Signed-off-by: discord9 <discord9@163.com>

---------

Signed-off-by: discord9 <discord9@163.com>
2026-04-15 11:19:48 +00:00
Weny Xu
24e3364142 fix: relax azblob validation requirements (#7970) 2026-04-15 08:08:39 +00:00
ZonaHe
8a3bd374a8 feat: update dashboard to v0.12.1 (#7969)
Co-authored-by: sunchanglong <sunchanglong@users.noreply.github.com>
2026-04-15 03:45:35 +00:00
LFC
43225a8eee feat: introducing "JSON2" type (#7965)
Signed-off-by: luofucong <luofc@foxmail.com>
2026-04-15 03:38:01 +00:00
Lei, HUANG
00d67d6fa1 refactor(mito): remove Compactor::compact method (#7968)
refactor/remove-compactor-compact:
 ### Remove Unused Compaction Functionality

 - **Removed `compact` Method**: Eliminated the `compact` method from the `Compactor` trait and its default implementation, which was primarily used for local compaction in testing. This change affects `compactor.rs`.
 - **Code Cleanup**: Removed associated code and comments related to the `compact` method, streamlining the `Compactor` trait interface.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-04-15 02:50:47 +00:00
LFC
a870b53f68 fix: mysql prepare correctly returns error instead of panic (#7963)
feat: mysql writer support multiple statement execution

Signed-off-by: luofucong <luofc@foxmail.com>
2026-04-15 01:59:16 +00:00
Ruihang Xia
3fe8a61fad perf: join metrics tables on the tsid key whenever possible (#7927)
* feat: prefilter flat parquet scans by primary key

* perf: skip redundant series divide repartitions

* perf: optimize tsid promql join planning

* perf: preserve tsid distribution through merge scans

* perf: remove redundant tsid join repartitions

* fix multi-field join case

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* Revert "feat: prefilter flat parquet scans by primary key"

This reverts commit 767c3b44c8.

* simplification

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* isolate rule into a dedicated mod

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* remove rule

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* more sqlness cases

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix filter join case

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: normalize sqlness repartition input count

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: normalize sqlness partition count in promql regression

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix: normalize sqlness hash partition fanout

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* simplification

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2026-04-14 19:43:58 +00:00
Yingwen
60fc455149 fix: always skip field pruning when using merge mode (#7957)
* test: add prefilter regressions for last_row null filters

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix: skip fields in all merge mode

Signed-off-by: evenyag <realevenyag@gmail.com>

* refactor: simplify pre-filter skip fields handling

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: update test

Signed-off-by: evenyag <realevenyag@gmail.com>

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-04-14 11:00:52 +00:00
fys
c90e4147de refactor: introduce the ProjectInput structure (#7908)
* refactor: introduce the ProjectInput structure

* remove unused import

* fix: cr

* fix: cr

* fix: code review

* add more unit test

* avoid clone of input.projection
2026-04-14 09:29:33 +00:00
shuiyisong
6fcca6e0d6 feat: implement trace type whitelist (#7930)
* feat: implement trace type whitelist

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: use opentelemetry_semantic_conventions for key name

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: add ref doc in the comments

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* fix: fmt toml

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: introduce trace_semconv.rs for holding the mapping

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: update key list

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* fix: fmt

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-04-14 09:12:41 +00:00
fys
62013217c7 fix: cargo check -p common-meta (#7964)
fix: moka feature
2026-04-14 08:27:22 +00:00
liyang
6bafaf29da ci: set upload timeout for uploading artifacts to S3 (#7958)
* ci: set upload timeout for uploading artifacts to S3

Signed-off-by: liyang <daviderli614@gmail.com>

* Update upload-artifacts-to-s3.sh

---------

Signed-off-by: liyang <daviderli614@gmail.com>
2026-04-14 03:16:54 +00:00
jeremyhi
e3f7ea8783 feat(cli): implement import-v2 data import pipeline (#7898)
* feat(cli): implement import-v2 data import pipeline

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* fix: cargo fmt

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* fix: by AI comments

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* fix(cli): harden import-v2 snapshot validation

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* fix: excape sql

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* fix(cli): redact escaped secrets in copy sql logs

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* test(cli): tighten export v2 e2e helpers

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* fix(cli): log execution time

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-04-14 03:15:36 +00:00
Ruihang Xia
8ad77ce649 perf: optimize extrapolated rate op family (#7880)
* perf(promql): optimize extrapolated rate hot path

* more ut

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix gauge rate case

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* adjust comments

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2026-04-13 19:11:56 +00:00
Ning Sun
32a2990802 feat: allow customizing trace table partitions (#7944)
* feat: allow customizing trace table partitions

* feat: add hint

* feat: return error on invalid partition number

* feat: add full failure/partial success/full success

* chore: format

* fix: address review suggestion
2026-04-13 14:10:55 +00:00
discord9
3750819f93 fix: match term zh (#7952)
* fix: match term zh

Signed-off-by: discord9 <discord9@163.com>

* chore: per gemini

Signed-off-by: discord9 <discord9@163.com>

* chore: revert accident change

Signed-off-by: discord9 <discord9@163.com>

* feat: unicode script han

Signed-off-by: discord9 <discord9@163.com>

---------

Signed-off-by: discord9 <discord9@163.com>
2026-04-13 13:04:11 +00:00
Yingwen
a24c58e25c chore: fix git cliff errors in latest version (#7947)
* chore: fix git cliff errors in latest version

- Fix errors in v2.12.0
- Do not generate logs for beta/rc tags between the compared commits

Signed-off-by: evenyag <realevenyag@gmail.com>

* chore: preserve blank line before release date in changelog

Signed-off-by: evenyag <realevenyag@gmail.com>

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-04-13 09:11:38 +00:00
Weny Xu
57f1921253 feat: propagate staging leader through lease and heartbeat (#7950)
* feat(mito): expose staging leader role state

* fix(region): clear staging metadata on leader exit

* feat: propagate staging leader role through heartbeat and metasrv

* chore: update comments

Signed-off-by: WenyXu <wenymedia@gmail.com>

* fix(region): unify staging exit role transitions

* chore: update proto

Signed-off-by: WenyXu <wenymedia@gmail.com>

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-04-13 09:04:02 +00:00
Yingwen
01a73105b8 feat: use partition range cache in scan (#7873)
* feat: use range cache in scan

Signed-off-by: evenyag <realevenyag@gmail.com>

* refactor: rename dedup to skip_dedup

Signed-off-by: evenyag <realevenyag@gmail.com>

* feat: use background concat for buffered batches

Signed-off-by: evenyag <realevenyag@gmail.com>

* chore: fmt

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix: store permits

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix: fix potential panic

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix: skip range-cache wrapping when cache is disabled

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix: avoid potential deadlock

Deadlock Chain

1. Range-level merge tasks: Each concurrent build_flat_partition_range_read (line 494-506) calls
build_flat_reader_from_sources → create_parallel_flat_sources → spawn_flat_scan_task. These
background tasks loop: acquire permit → input.next() → release permit.
2. Final merge tasks: After all range tasks return streams (line 509-511), the distributor calls
build_flat_reader_from_sources again (line 520-527) → create_parallel_flat_sources → more
spawn_flat_scan_task tasks. These also loop: acquire permit → input.next() → release permit.
3. Circular wait: The final merge tasks' input.next() reads from ReceiverStreams backed by
range-level merge tasks. If all num_partitions permits are held by final merge tasks blocked on
input.next(), the range-level merge tasks can't acquire permits to produce data → deadlock.

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: add test for small permits

Signed-off-by: evenyag <realevenyag@gmail.com>

* feat: use avg batch size for channel size

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: fix test

Signed-off-by: evenyag <realevenyag@gmail.com>

* chore: address review comments

Signed-off-by: evenyag <realevenyag@gmail.com>

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-04-13 08:27:53 +00:00
Lei, HUANG
9f7ffb4d26 feat(mito2): allow CompactionOutput to succeed independently (#7948)
* refactor(mito2): improve compaction error handling and file removal

Refactor compaction task execution to enhance error handling and robustness.
- Implemented parallel execution of compaction tasks with proper error capture and logging for individual task failures.
- Ensured JoinSnafu is no longer directly used in error propagation, instead handling errors within the task processing loop.
- Adjusted file removal logic to correctly include expired SSTs after compaction merges.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* refactor(mito2): extract SstMerger trait for testability in compaction

Extract SstMerger trait and DefaultSstMerger implementation to improve the testability of DefaultCompactor.

The DefaultCompactor is now generic over SstMerger, allowing mock implementations to be injected for unit testing without relying on the full object storage access layer. This refactoring separates the concerns of SST file merging from the overall compaction orchestration logic.

Additionally:
- Updated CompactionScheduler to use DefaultCompactor::default().
- Added unit tests for DefaultCompactor using a MockMerger.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* fix(compaction): propagate join error during sst flush

Correctly propagates the error when joining SST flush handles during compaction. Previously, the error was logged but not returned, leading to potential silent failures.
Also reorders some imports for consistency.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* perf(compaction): pre-allocate capacity for compacted_inputs

Pre-allocates capacity for the compacted_inputs vector based on the estimated total size of inputs and expired SSTs. This optimization aims to reduce vector reallocations during the compaction process.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* feat/allow-partial-compaction:
 ### Commit Message

 Enhance `DefaultCompactor` and `MockMerger` for Improved Flexibility

 - **`compactor.rs`**:
   - Added `Clone` trait to `DefaultSstMerger` and `MockMerger` to allow cloning.
   - Removed `Arc` wrapping from `DefaultCompactor`'s `merger` field for direct usage.
   - Updated `merge_ssts` method to require `Clone` trait for `SstMerger`.
   - Modified `MockMerger` to use `Arc<Mutex>` for `results` and `call_idx` to ensure thread safety.
   - Adjusted error handling to use `error::InvalidMetaSnafu` directly.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

---------

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-04-13 08:12:11 +00:00
Lei, HUANG
d1b2a31097 fix: randomize standalone test ports in cli export test (#7955)
fix/flaky-test:
 ### Add Dynamic Port Selection for Standalone Tests

 - **`cli.rs`**: Implemented functions `random_standalone_addrs` and `choose_random_unused_port_offset` to dynamically select unused ports for standalone tests, enhancing test reliability.
 - Updated `test_export_create_table_with_quoted_names` to use dynamically assigned ports for HTTP, RPC, MySQL, and PostgreSQL addresses.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-04-13 06:42:55 +00:00
fys
76cad696c6 feat: add parquet nested leaf projection (#7900)
* feat: add parquet nested leaf projection

* rename ParquetProjection related struct

* add some apis

* extract common build schema function for test

* remove unsed method

* keep only deduped parquet root projection constructor

* add more unit tests

* fix: typo

* fix: cr

* fast-path parquet root projection without nested fields

* extract a build_projection_mask method

* fix: cargo clippy
v1.0.0-nightly-20260413
2026-04-10 10:41:48 +00:00
cui
06e49961c7 fix(index): intersect bitmaps before early exit in predicates applier (#7867)
* fix(index): intersect bitmaps before early exit in predicates applier

The loop skipped intersecting when the next bitmap was empty, which left
the accumulator unchanged instead of zeroing it. Intersect first, then
break when the result is empty.

Signed-off-by: Weixie Cui <cuiweixie@gmail.com>

* per gemini

* style(index): format predicates applier loop

* fix(index): remove unused mut in predicates applier

---------

Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
Co-authored-by: discord9 <55937128+discord9@users.noreply.github.com>
Co-authored-by: discord9 <discord9@163.com>
2026-04-10 09:22:12 +00:00
liyang
a53a0d57ad fix: fix current version comparison logic for pre-releases (#7946)
Signed-off-by: liyang <daviderli614@gmail.com>
2026-04-10 08:37:52 +00:00
Ning Sun
59021ce83b fix: using uint64 datatype for postgres prepared statement parameters (#7942)
* feat: add support for decimal parameter type, remove string replacement fallback

* chore: format

* fix: add support for using unsigned bigint in postgres

* chore: format toml

* refactor: cleanup duplicated code

* fix: rescale decimal
2026-04-10 07:56:33 +00:00
Yingwen
fd94f55193 refactor(mito2): remove dead scan code (#7925)
* refactor(mito2): remove dead batch parallel scan helpers

Signed-off-by: evenyag <realevenyag@gmail.com>

* refactor(mito2): remove dead merge reader path

Signed-off-by: evenyag <realevenyag@gmail.com>

* refactor(mito2): remove dead batch dedup reader

Signed-off-by: evenyag <realevenyag@gmail.com>

* test(mito2): remove obsolete batch source helper

Signed-off-by: evenyag <realevenyag@gmail.com>

* refactor: remove unused plain batch

Signed-off-by: evenyag <realevenyag@gmail.com>

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-04-10 03:12:33 +00:00
Ning Sun
e9d783cccf feat: execution timeout for prepared statement (#7932)
* feat: execution timeout for prepared statement

* fix: lint fix
2026-04-09 19:18:56 +00:00
Yingwen
fb5333e116 ci: add standalone workflows for bumping helm charts and homebrew (#7941)
ci: add standalone workflows for bumping helm charts and homebrew versions

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-04-09 12:37:24 +00:00
Lanqing Yang
24ab861052 chore: move Tantivy fulltext search to blocking thread pool (#7919)
perf: move Tantivy fulltext search to blocking thread pool

Wrap the synchronous Tantivy search (query parsing, posting list
traversal, stored field reads) in spawn_blocking_global to avoid
starving the tokio async runtime with CPU-bound work.

Signed-off-by: lyang24 <lanqingy93@gmail.com>
2026-04-09 11:12:05 +00:00
Weny Xu
dca451c485 fix: remap peer addresses during retries (#7933)
* fix: remap peer addresses during retries

Signed-off-by: WenyXu <wenymedia@gmail.com>

* chore: styling

Signed-off-by: WenyXu <wenymedia@gmail.com>

* test: add tests

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>
2026-04-09 03:40:14 +00:00
Ruihang Xia
09b368c00a feat: tune constants (#7851)
* feat: tune constants

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* cap output batch size

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* handle empty input

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* one more ut for cr

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2026-04-08 23:34:13 +00:00
Yingwen
f3dbf34c74 chore: bump version to 1.0.0 (#7935)
* chore: bump version to 1.0.0

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: fix sqlness test

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: fix cluster info sqlness

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: reorder regex in cluster_info

Signed-off-by: evenyag <realevenyag@gmail.com>

* chore: fix pg catalog

Signed-off-by: evenyag <realevenyag@gmail.com>

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
v1.0.0
2026-04-08 15:15:27 +00:00
Weny Xu
6cc68ee8e1 fix(repartition): harden repartition rollback paths (#7918)
* fix(meta-srv): restore repartition group metadata on rollback

Signed-off-by: WenyXu <wenymedia@gmail.com>

* test(meta-srv): add repartition group rollback coverage

* fix(meta-srv): rollback allocated regions on repartition failure

* test(meta-srv): cover repartition parent rollback flow

* test(meta-srv): cover repartition retry paths

* fix: fix unit tests

Signed-off-by: WenyXu <wenymedia@gmail.com>

* chore: apply suggestions from CR

Signed-off-by: WenyXu <wenymedia@gmail.com>

* chore: apply suggestions

Signed-off-by: WenyXu <wenymedia@gmail.com>

* test: add unit tests

Signed-off-by: WenyXu <wenymedia@gmail.com>

* fix: persist repartition allocate state for retry and rollback

Signed-off-by: WenyXu <wenymedia@gmail.com>

* chore: apply suggestions from CR

Signed-off-by: WenyXu <wenymedia@gmail.com>

* fix: retry repartition mailbox channel close

Signed-off-by: WenyXu <wenymedia@gmail.com>

* chore: apply suggestions from CR

Signed-off-by: WenyXu <wenymedia@gmail.com>

* chore: refine logs

* chore: add comments

Signed-off-by: WenyXu <wenymedia@gmail.com>

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-04-08 12:06:11 +00:00
Ning Sun
70ad412092 fix: resolve postgres format and sync cleanup issues (#7928) 2026-04-08 06:41:19 +00:00
Lei, HUANG
2f8607138d docs(metric-engine): update prom_store example configs (#7920)
docs: update prom_store example configs

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-04-08 02:59:39 +00:00
discord9
b623cb1aa2 perf: no longer window sort when limit (#7912)
* perf: no longer window sort when limit

Signed-off-by: discord9 <discord9@163.com>

* test: confusing vector sqlness

Signed-off-by: discord9 <discord9@163.com>

* chore: redact sqlness

Signed-off-by: discord9 <discord9@163.com>

* chore: redact every thing

Signed-off-by: discord9 <discord9@163.com>

* REDACTED

Signed-off-by: discord9 <discord9@163.com>

* what

Signed-off-by: discord9 <discord9@163.com>

---------

Signed-off-by: discord9 <discord9@163.com>
2026-04-08 02:54:22 +00:00
jeremyhi
6e0f5c5042 chore: memory limit comment (#7914)
* chore: memory limit comment

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* chore: by gemini comment

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-04-08 00:37:03 +00:00
Yingwen
6c72dc8e57 fix: add overflow check before interleave() (#7921)
* fix: add overflow check before interleave()

Signed-off-by: evenyag <realevenyag@gmail.com>

* refactor: pass batches and column index to check_interleave_bytes_overflow

Refactor check_interleave_bytes_overflow to accept batches and a column
index directly, avoiding the intermediate Vec collection of arrays.

Signed-off-by: evenyag <realevenyag@gmail.com>

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-04-07 21:59:29 +00:00
Ning Sun
1df9837538 refactor!: update arrow-ipc output to stream format (#7922)
* refactor!: update arrow-ipc output to stream format

* chore: format
2026-04-07 11:37:21 +00:00
Yingwen
233e35c0c9 feat!: switch default sst format to flat (#7909)
* feat: support alter from primary_key to flat

Signed-off-by: evenyag <realevenyag@gmail.com>

* chore: alter flat to primary_key

Signed-off-by: evenyag <realevenyag@gmail.com>

* feat: change default_experimental_flat_format to true

Signed-off-by: evenyag <realevenyag@gmail.com>

* feat: compute channel size from splitted batch size

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: add tests for split and channel size

Signed-off-by: evenyag <realevenyag@gmail.com>

* fix: always set sst_format from manifest on region open

sanitize_region_options did not set options.sst_format when the
default (PrimaryKey) matched the manifest value, leaving it as None
after reopen. This caused the alter format change to appear lost.

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: fix tests

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: show create table after alteration

Signed-off-by: evenyag <realevenyag@gmail.com>

* refactor!: rename default_experimental_flat_format to default_flat_format

The flat format is no longer experimental. Remove "experimental" from
the config field name, doc comments, and all references.

Signed-off-by: evenyag <realevenyag@gmail.com>

* chore: fix clippy

Signed-off-by: evenyag <realevenyag@gmail.com>

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
v1.0.0-rc.2-nightly-20260406
2026-04-03 04:14:02 +00:00
shuiyisong
a9256f0310 refactor: extract otel helper (#7910)
* refactor: extract otel helper

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: move to submodule

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-04-03 04:13:44 +00:00
Lei, HUANG
a424ee1c0a refactor(metric-engine): Refactor PendingRowsBatcher for better testability and benchmarking (#7902)
* perf/schema-align:
 **Refactor and Enhance Error Handling in `pending_rows_batcher.rs`**

 - **Refactored `record_failure` Macro**: Moved the `record_failure` macro outside of the `flush_batch_physical` function to improve code reuse and maintainability.
 - **Enhanced Batch Transformation**: Introduced `transform_logical_batches_to_physical` function to handle the transformation of logical table batches into physical format.
 - **Batch Concatenation**: Added `concat_modified_batches` function to concatenate modified batches into a single batch.
 - **Region Write Splitting**: Implemented `split_and_encode_region_writes` function to split combined batches into region-specific writes based on partition rules.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* perf/schema-align:
 Add tests for `transform_logical_batches_to_physical` in `pending_rows_batcher.rs`

 - Implemented `mock_tag_batch` function to create mock `RecordBatch` instances for testing.
 - Added multiple test cases for `transform_logical_batches_to_physical`:
   - `test_transform_logical_batches_to_physical_success`: Verifies successful transformation of logical to physical batches.
   - `test_transform_logical_batches_to_physical_taxonomy_failure`: Tests failure scenario when column IDs are missing.
   - `test_transform_logical_batches_to_physical_multiple_batches`: Checks handling of multiple batches.
   - `test_transform_logical_batches_to_physical_mixed_success_failure`: Tests mixed success and failure scenarios.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* perf/schema-align: refactor `flush_batch_physical` for better testability

Introduced several traits to abstract dependencies on CatalogManager, PartitionRuleManager,
and NodeManager, enabling easier unit testing with mock implementations.

- Added `PhysicalFlushCatalogProvider`, `PhysicalFlushPartitionProvider`, and `PhysicalFlushNodeRequester` traits.
- Implemented adapters for existing managers to satisfy the new traits.
- Refactored `flush_batch_physical` to use these traits instead of concrete manager references.
- Modularized region write planning, resolution, and encoding into standalone functions.
- Added comprehensive unit tests for the refactored logic, including edge cases for table lookup and region routing.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* perf/schema-align:
 ### Enhance Error Handling and Simplify Code in `error.rs` and `pending_rows_batcher.rs`

 - **Error Handling Improvements**:
   - Added new error variants `Partition` and `MetricEngine` in `error.rs` to handle specific error cases.
   - Updated error propagation using `ResultExt` and `context` for better error messages and handling in `pending_rows_batcher.rs`.

 - **Code Simplification**:
   - Removed `FlushWriteResult` enum and refactored `flush_region_writes_concurrently` to return `Result<()>`.
   - Simplified error handling in `flush_batch_physical` and related functions by removing `first_error` and using `Result` for error propagation.

 - **Test Adjustments**:
   - Updated tests to align with the new error handling approach, ensuring they check for specific error messages and conditions.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* perf/schema-align: refactor `PendingBatch` to use `Option` for cleaner state management

Refactored `PendingBatch` in `pending_rows_batcher.rs` to use `Option<PendingBatch>`
within the worker loop. This change simplifies initialization and cleanup logic
by leveraging `Option::get_or_insert_with` and `Option::take`.

- Updated `PendingBatch` fields `created_at` and `ctx` to be non-optional.
- Modified `drain_batch` to take `&mut Option<PendingBatch>` and return the
  drained batch, removing the need for `flush_with_error`.
- Simplified the worker loop logic for batch creation and flushing.
- Added a unit test `test_drain_batch_takes_initialized_pending_batch_from_option`
  to verify the new draining logic.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* perf/schema-align: share errors across waiters using `Arc<Error>`

Enhanced error reporting in `PendingRowsBatcher` by using `Arc<Error>` in
`FlushWaiter` and `WorkerCommand`. This allows the same error instance to be
shared among all waiters of a batch, avoiding redundant error string conversions
and providing more structured error information.

- Added `SubmitBatch` variant to `Error` in `error.rs`.
- Updated `FlushWaiter` and `WorkerCommand` to use `std::result::Result<(), Arc<Error>>`.
- Refactored `notify_waiters` to distribute the shared `Arc<Error>`.
- Added `SubmitBatchSnafu` context when receiving results from the worker.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* perf/schema-align: export types for benchmarking

Exported several internal types and traits from `pending_rows_batcher.rs` to enable
external benchmarking of the physical batch flushing logic.

- Made `PhysicalTableMetadata`, `PhysicalFlushCatalogProvider`,
  `PhysicalFlushPartitionProvider`, `PhysicalFlushNodeRequester`,
  `TableBatch`, and `flush_batch_physical` public.
- Added a new criterion benchmark `flush_batch_physical.rs` to measure the
  performance of physical batch flushing with varying numbers of logical
  tables and rows per table.
- Registered the new benchmark in `src/servers/Cargo.toml`.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* fix: typo

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* refactor(servers): improve error handling and documentation in batcher

Refactored error handling in `pending_rows_batcher.rs` by using `ArrowSnafu`
for RecordBatch projection errors and simplified partition rule fetching.
Added comprehensive documentation for `flush_batch_physical` and updated
error display for `SubmitBatch`.

- Added `Location` to `Arrow` error variant for better traceability.
- Updated `SubmitBatch` display to include source error.
- Replaced manual error mapping with `context(error::ArrowSnafu)` in
  `strip_partition_columns_from_batch`.
- Added doc comments to `flush_batch_physical` outlining the pipeline steps.
- Optimized capacity allocation in `transform_logical_batches_to_physical`.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* refactor(servers): clarify physical table metadata and simplify planned batch

Renamed `name_to_ids` to `col_name_to_ids` in `PhysicalTableMetadata` to
better reflect its purpose. Refactored `PlannedRegionBatch` to use a
`num_rows()` method instead of storing a redundant `row_count` field.

- Updated `PhysicalTableMetadata` and its usages in `pending_rows_batcher.rs`
  and benchmarks.
- Removed `row_count` field from `PlannedRegionBatch` and added a `num_rows()`
  helper.
- Cleaned up manual `with_context` closures for table lookups.
- Fixed a minor formatting issue in worker command processing.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

* refactor(servers): simplify flush write structs and centralize metrics

Removed redundant `row_count` fields from `FlushRegionWrite` and
`PlannedRegionBatch` (made the helper method test-only). Centralized the
incrementing of `FLUSH_TOTAL` and `FLUSH_ROWS` metrics into `flush_batch`
to avoid duplication and ensure consistency.

- Removed `row_count` from `FlushRegionWrite` and `PlannedRegionBatch`.
- Marked `PlannedRegionBatch::num_rows()` as `#[cfg(test)]`.
- Updated `flush_batch` to handle `FLUSH_TOTAL` and `FLUSH_ROWS` metrics.
- Simplified concurrent and sequential flush logic by removing local metric
  updates.
- Cleaned up related tests to match the structural changes.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>

---------

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-04-03 02:56:18 +00:00
jeremyhi
f0ea87f52f fix: windows ci (#7905)
* fix: windows ci

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* fix: typo

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* chore: use common create_temp_dir

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-04-03 02:17:42 +00:00
shuiyisong
8d495909d3 feat: auto alter table during trace ingestion from int to float (#7871)
* feat: impl alter table

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: minor refactor

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: address issues

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: address issues

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-04-02 10:01:18 +00:00
Yingwen
2af59ed386 feat: always use flat scan path for both format (#7901)
* feat: remove primary_key format scan path

Signed-off-by: evenyag <realevenyag@gmail.com>

* feat: remove flat format flag

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: remove CompatReader tests

Signed-off-by: evenyag <realevenyag@gmail.com>

* chore: show whether the format is flat in explain

Signed-off-by: evenyag <realevenyag@gmail.com>

* test: stable series scan result

Signed-off-by: evenyag <realevenyag@gmail.com>

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-04-02 07:53:33 +00:00
shuiyisong
ba32c5fe9e chore: remove unused deps using udeps (#7906)
* chore: remove unused deps using udeps

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: fmt toml

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-04-02 06:49:27 +00:00