Commit Graph

5263 Commits

Author SHA1 Message Date
discord9
3e53a562cf feat: get stat for aggr
Signed-off-by: discord9 <discord9@163.com>
2026-04-15 15:28:06 +08:00
discord9
a5686f0042 feat: scaffold for aggr
Signed-off-by: discord9 <discord9@163.com>
2026-04-09 12:28:13 +08:00
discord9
514abfc133 docs: rfc for partial eval
Signed-off-by: discord9 <discord9@163.com>
2026-04-08 16:47:48 +08:00
Weny Xu
9bd983ea40 fix: prevent stale in-flight cache refill after invalidation in CacheContainer (#7825)
* fix: prevent stale cache refill after invalidate

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

* chore: apply suggestions from CR

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

* feat: introduce `get_latest`

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

* chore: styling

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

* fix: enforce construction-time cache init strategy

Make cache initialization behavior explicit via InitStrategy selected at construction and document dirty-vs-checked semantics. Keep latest-read call compatibility while partition manager uses strategy-driven get paths.

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

* test: rename get_by_ref freshness test

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

* feat: use `InitStrategy::VersionChecked` for table route cache

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

* chore: apply suggestions

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

* chore: apply suggestions from CR

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-03-24 04:24:15 +00:00
Yingwen
5231ee40c8 feat: add parquet pk prefilter helpers (#7850)
* feat: extract parquet pk prefilter helpers

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

* chore: fmt code

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

* chore: fix warnings

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

* chore: update todo

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

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-03-24 03:57:18 +00:00
dependabot[bot]
6bebf93caf chore(deps): bump tar from 0.4.44 to 0.4.45 (#7846)
Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.44 to 0.4.45.
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.44...0.4.45)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 0.4.45
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-24 02:15:27 +00:00
dependabot[bot]
7afe16ddf7 chore(deps): bump rustls-webpki from 0.103.3 to 0.103.10 (#7847)
Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.103.3 to 0.103.10.
- [Release notes](https://github.com/rustls/webpki/releases)
- [Commits](https://github.com/rustls/webpki/compare/v/0.103.3...v/0.103.10)

---
updated-dependencies:
- dependency-name: rustls-webpki
  dependency-version: 0.103.10
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-24 02:15:06 +00:00
dennis zhuang
223f6cfdf7 feat: supports sst_format for x-greptime-hints and database options (#7843)
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-03-24 02:05:16 +00:00
Ruihang Xia
f999d5e70e feat: avoid some vector-array conversions on flat projection (#7804)
* perf(mito2): optimize flat projection conversion

* shrink the diff size

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

* apply gemini's sugg

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

* nit

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

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2026-03-24 00:11:37 +00:00
Lei, HUANG
7874282089 feat(mito): flat scan for time series memtable (#7814)
* feat/flat-for-time-series:
 ### Commit Message

 Enhance `TimeSeriesMemtable` with Record Batch Support

 - **`time_series.rs`**:
   - Introduced `BatchToRecordBatchContext` to facilitate conversion of batch iterators to record batch iterators.
   - Added `build_record_batch` method in `TimeSeriesIterBuilder` to support record batch creation.
   - Implemented multiple test cases to validate the functionality of record batch creation, including tests for projections,
 deduplication, sequence filtering, and data correctness.

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

* feat/flat-for-time-series:
 Refactor `TimeSeriesMemtable` and `TimeSeriesIterBuilder`

 - Renamed `adapter_context` to `batch_to_record_batch` in `TimeSeriesMemtable` for clarity.
 - Simplified `MemtableRangeContext` initialization by removing the `batch_to_record_batch` parameter.
 - Added `is_record_batch` method to `TimeSeriesIterBuilder` to indicate record batch status.

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

* feat/flat-for-time-series:
 ### Add Time Range Filtering and Predicate Group Enhancements

 - **`memtable.rs`**: Updated `IterBuilder` to include `time_range` parameter in `build_record_batch` method, enhancing record batch iteration with time range filtering.
 - **`time_series.rs`**: Modified `TimeSeriesIterBuilder` to use `PredicateGroup` instead of `Predicate`, and integrated `PruneTimeIterator` for time-based filtering.
 - **`memtable_util.rs`**: Removed unused `Predicate` import, reflecting changes in predicate handling.

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

---------

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-03-23 19:39:57 +00:00
Lei, HUANG
72f289df50 chore: remove GrpcQueryHandler::put_record_batch (#7844)
chore: remove GrpcQueryHandler::put_record_batch, we should use GrpcQueryHandler::handle_put_record_batch_stream instead

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-03-23 07:12:39 +00:00
jeremyhi
805536aed1 fix: windows file path (#7839)
Signed-off-by: jeremyhi <fengjiachun@gmail.com>
v1.0.0-rc.2-nightly-20260323
2026-03-20 08:19:41 +00:00
Ning Sun
d14817bfa6 fix: resolve optimization issue for extended query (#7824)
* fix: resolve optimization issue for extended query

* fix: type cast from subquery

* chore: update error information in sqlness

* chore: switch to released pgwire

* refactor: remove optimize function completely

* chore: add more tests

* test: attempt to fix the fuzz issue

* fix: try to resolve the test issue
2026-03-20 03:58:39 +00:00
Ruihang Xia
f034255fe6 perf: support group accumulators for state wrapper (#7826)
* perf: support group accumulators for state wrapper

* new tests and avoid clone

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

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2026-03-19 22:40:52 +00:00
jeremyhi
16fcbb2729 feat: export import v2 pr1 (#7785)
* feat: v2 schema handling

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

* feat: impl m1.5 ddl export/import and schema tests

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

* chore: git ignore update

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

* chore: add license header

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

* chore: make fmt-check happy

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

* fix: Run imported DDL against the intended schema

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

* fix: Canonicalize schema names after case-insensitive check

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

* fix: escape sql funcs

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

* fix: Fixed by carrying explicit execution_schema in DdlStatement instead of parsing schema from SQL

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

* fix: Fixed by encoding schema names as safe path segments in shared DDL path helpers

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

* refactor(cli): make export/import v2 schema recovery DDL-only

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

* chore: by clippy

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

* chore: follow our styling

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

* fix(cli): reject remote snapshot URIs with empty root

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

* fix(cli): dedupe schema filters after canonicalization

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

* fix(cli): schema-scoped detection to cover external tables

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

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-03-19 21:26:41 +00:00
Ruihang Xia
2af3951944 feat: cache decoded region metadata alone with parquet metadata (#7813)
* cache decoded region metadata

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

* fix: account for decoded sst metadata cache weight

* take optional pre-exist metadata

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

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2026-03-19 03:09:47 +00:00
discord9
f2bccbd96a docs: flow inc query rfc (#7816)
* docs: flow inc query rfc

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

* chore: typo

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

* chore

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

* docs: clarify flow incremental stale recovery

Clarify that flush-boundary invalidation is part of IncrementalQueryStale, and document the in-memory checkpoint plus cold-start full snapshot recovery model.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: discord9 <discord9@163.com>

---------

Signed-off-by: discord9 <discord9@163.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-19 00:37:40 +00:00
ZonaHe
cc441b5642 feat: update dashboard to v0.12.0 (#7823)
Co-authored-by: sunchanglong <sunchanglong@users.noreply.github.com>
2026-03-17 18:25:14 +00:00
Lei, HUANG
dc98e0215b feat(metric-engine): support bulk inserts with put fallback (#7792)
* feat(metric-engine): support bulk inserts

Implement `RegionRequest::BulkInserts` to support efficient columnar data
ingestion in the metric engine.

Key changes:
- Implement `bulk_insert_region` to handle logical-to-physical region mapping
  and dispatch writes.
- Add `batch_modifier` for `RecordBatch` transformations, specifically for
  `__tsid` generation and sparse primary key encoding.
- Integrate `BulkInserts` into the `MetricEngine` request handling logic.
- Provide a row-based fallback mechanism if the underlying storage doesn't
  support bulk writes.

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

* feat/metric-engine-bulk-insert:
 ### Update `bulk_insert.rs` to Support Partition Expression Version

 - **Enhancements**:
   - Added support for `partition_expr_version` in `RegionBulkInsertsRequest` and `RegionPutRequest`.
   - Modified the handling of `partition_expr_version` to be dynamically set from the `request` object.

 Files affected:
 - `src/metric-engine/src/engine/bulk_insert.rs`

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

* fix: cargo lock revert

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

* add doc for conversions

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

* chore: simplify test

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

* feat/metric-engine-bulk-insert:
 ### Refactor `bulk_insert.rs` in `metric-engine`

 - **Refactor Functionality**:
   - Replaced `resolve_tag_columns` with `resolve_tag_columns_from_metadata` to streamline tag column resolution.
   - Moved logic for resolving tag columns directly into `resolve_tag_columns_from_metadata`, removing the need for an external function call.
 - **Enhancements**:
   - Improved error handling and context provision for missing physical regions and columns.
   - Optimized tag column sorting and index management within the batch processing logic.

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

* feat/metric-engine-bulk-insert:
 ### Refactor `record_batch_to_rows` Function in `bulk_insert.rs`

 - Simplified the `record_batch_to_rows` function by removing the `logical_metadata` parameter and directly validating column types within the function.
 - Enhanced error handling for timestamp, value, and tag columns by checking their data types and providing detailed error messages.
 - Replaced the use of `Helper::try_into_vector` with direct downcasting to `TimestampMillisecondArray`, `Float64Array`, and `StringArray` for improved type safety and clarity.
 - Updated the construction of `api::v1::Rows` to directly handle null values and construct `api::v1::Value` objects accordingly.

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

* feat/metric-engine-bulk-insert:
 ## Commit Message

 Refactor `bulk_insert.rs` to optimize state access

 - Moved the state read operation inside a new block to limit its scope and improve code clarity.
 - Adjusted logic for processing `tag_columns` and `non_tag_indices` to work within the new block structure.

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

* feat/metric-engine-bulk-insert:
 ### Refactor `compute_tsid_array` Function

 - **Refactored `compute_tsid_array` function**: Modified the function signature to accept `tag_arrays` as a parameter instead of building it internally. This change affects the following files:
   - `src/metric-engine/src/batch_modifier.rs`

 - **Updated test cases**: Adjusted test cases to accommodate the new `compute_tsid_array` function signature by passing `tag_arrays` explicitly.

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

* docs: add doc for bulk_insert_region

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

* feat/metric-engine-bulk-insert:
 ### Commit Message

 Refactor `bulk_insert.rs` in `metric-engine`:

 - Removed error handling for unsupported status codes in `write_data` method.
 - Eliminated `record_batch_to_rows` function, simplifying the data insertion process.
 - Streamlined the `write_data` method by removing fallback logic for unsupported operations.

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

* feat/metric-engine-bulk-insert:
 - **Optimize Primary Key Construction**: Refactored `modify_batch_sparse` in `batch_modifier.rs` to use `BinaryBuilder` for more efficient primary key construction.
 - **Add Fallback for Unsupported Bulk Inserts**: Updated `bulk_insert.rs` to handle unsupported bulk inserts by converting record batches to rows and using `RegionPutRequest`.
 - **Implement Record Batch to Rows Conversion**: Added `record_batch_to_rows` function in `bulk_insert.rs` to convert `RecordBatch` to `api::v1::Rows` for fallback operations.

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

* feat/metric-engine-bulk-insert:
 Add test for handling null values in `record_batch_to_rows`

 - Added a new test `test_record_batch_to_rows_with_null_values` in `bulk_insert.rs` to verify the handling of null values in the `record_batch_to_rows` function.
 - The test checks the conversion of a `RecordBatch` with null values in various fields to ensure correct row creation and schema handling.

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

* feat/metric-engine-bulk-insert:
 Add fallback path for unsupported status and improve error context handling

 - **`bulk_insert.rs`**:
   - Added a fallback path for `PartitionTreeMemtable` in case of unsupported status code.
   - Enhanced error handling by using `with_context` for better error messages when timestamp and value columns are not found in `RecordBatch`.

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

---------

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-03-17 11:28:06 +00:00
Yingwen
e0aadffb91 feat: add flat last row reader to the final stream (#7818)
Signed-off-by: evenyag <realevenyag@gmail.com>
2026-03-17 07:55:48 +00:00
Yingwen
5a37e58b4f feat(mito2): add partition range cache infrastructure (#7798)
* feat: add partition range cache infra

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

* refactor: optimize scan request fingerprint cloning

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

* refactor: merge loops

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

* chore: more docs

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

* chore: update estimated size method and comment

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

* chore: fix clippy

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

* feat: only cache when we scan files

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

* fix: address PR review comments for partition range cache

- Remove TimeSeriesDistribution from fingerprint as it only affects yield order
- Disable range cache when dyn filters are present since they change at runtime

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

* chore: fmt code

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

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-03-17 03:53:20 +00:00
Ning Sun
dd82fcac00 chore: update visibility of BatchToRecordBatchAdapter::new (#7817) 2026-03-16 09:56:34 +00:00
Lei, HUANG
be4a7a6d37 refactor: remove Memtable::iter (#7809)
* refactor: remove Memtable::iter

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

* fix: review comments

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

---------

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-03-16 07:49:31 +00:00
maximk777
b007f85986 feat(http): improve error logging with client IP (#7503)
* feat(http): improve error logging with client IP

- Add logging to ErrorResponse::from_error_message()
- Add middleware to log HTTP errors with client IP

Closes #7328

Signed-off-by: maximk777 <maximkirienkov777@gmail.com>

* fix(http): address review comments for error logging

Restore rich Debug logging in from_error(), add URI/method/matched path
to client IP middleware, and only log when client address is available.

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

---------

Signed-off-by: maximk777 <maximkirienkov777@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Co-authored-by: evenyag <realevenyag@gmail.com>
2026-03-16 07:10:33 +00:00
jeremyhi
c6f1ef8aec feat: track unlimited usage in memory manager (#7811)
* feat: track unlimited usage in memory manager

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

* chore: by gemini comment

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

* chore: remove unused import

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

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-03-16 03:52:27 +00:00
Ning Sun
306e8398cf fix: correct unicode representation for jsonb_to_string (#7810)
* fix: correct unicode representation for jsonb_to_string

* refactor: correct function name and behavior

* fix: fix json_to_string and provide tests
2026-03-16 03:01:02 +00:00
liyang
0dfbba0b3f ci: upload artifacts use s3 proxy (#7800)
* ci: upload artifacts use s3 proxy

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

* update echo context

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

---------

Signed-off-by: liyang <daviderli614@gmail.com>
v1.0.0-rc.2-nightly-20260316
2026-03-13 12:42:15 +00:00
Yingwen
e215851c8a refactor: unify flush and compaction to always use FlatSource (#7799)
* feat: support write flat as primary key format

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

* feat: migrate flush to always use FlatSource

Add FormatType propagation in SstWriteRequest and use it to choose
Flat vs PrimaryKey write paths (write_all_flat vs
write_all_flat_as_primary_key) in AccessLayer and WriteCache. Make
compactor and flush derive the sst_write_format from region options or
engine config. Simplify flush logic and remove the old memtable_source
helper. Update tests to set default sst_write_format.

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

* refactor: compaction use flat source

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

* refactor: read parquet sequentially as flat batches

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

* refactor: remove new_batch_with_binary in favor of new_record_batch_with_binary

Replace PrimaryKeyWriteFormat with FlatWriteFormat in test_read_large_binary
test and use new_record_batch_with_binary directly, removing the now-unused
new_batch_with_binary function and its BinaryArray import.

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

* test: add tests for PrimaryKeyWriteFormat::convert_flat_batch

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

* refactor: remove Either from SstWriteRequest

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

* fix: handle index build mode

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

* fix: consider sparse encoding and last non null in flush

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

* test: add unit tests for field_column_start edge cases

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

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-03-13 09:44:13 +00:00
LFC
74ff5c37ea refactor: customize standalone instance build (#7807)
* refactor: customize standalone instance build

Signed-off-by: luofucong <luofc@foxmail.com>

* resolve PR comments

Signed-off-by: luofucong <luofc@foxmail.com>

---------

Signed-off-by: luofucong <luofc@foxmail.com>
2026-03-13 09:25:21 +00:00
Weny Xu
20f38d8a6a test(fuzz): add metric table repartition fuzz target (#7754)
* 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>
2026-03-13 08:00:09 +00:00
dependabot[bot]
37105c8354 chore(deps): bump quinn-proto from 0.11.12 to 0.11.14 (#7805)
Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.11.12 to 0.11.14.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.12...quinn-proto-0.11.14)

---
updated-dependencies:
- dependency-name: quinn-proto
  dependency-version: 0.11.14
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-13 06:28:58 +00:00
dennis zhuang
0572a680af fix: allow empty string for env values (#7803)
* fix: allow empty string for env values

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* chore: strip suffix

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

---------

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-03-13 03:57:08 +00:00
Ning Sun
3cdf03d830 feat: introduce APIs for storing perses dashboard definition (#7791)
* feat: introduce APIs for storing perses dashboard definition

* test: ensure we can update dashboard

* refactor: construct dashboard defnition directly

* refactor: don't create table on list requests
2026-03-13 03:40:04 +00:00
discord9
3beb538aa8 fix: rm useless analyzer (#7797)
* fix: rm useless analyzer

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

* test: rm related test

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

* test: flow tql avg

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-03-12 10:53:47 +00:00
Chengjie Jin
7866132920 feat(procedure): detect potential deadlock when parent/child procedures share lock keys (#7752)
* feat(procedure): detect potential deadlock when parent/child share lock keys

Add a deadlock detection mechanism in submit_subprocedure() to warn
when a child procedure's lock_key overlaps with its parent's lock_key.

When this happens, the parent holds the lock while waiting for the child
to complete (at child_notify.notified().await), but the child blocks
forever trying to acquire the same lock. This is a classic Hold-and-Wait
deadlock.

The detection:
- Emits a warn! log in all builds (visible in production)
- Triggers debug_assert!(false) in debug/test builds for early CI detection

This partially addresses the TODO at line 121-122 and is a follow-up
to the discussion in: https://github.com/GreptimeTeam/greptimedb/issues/7692

Signed-off-by: YZL0v3ZZ <2055877225@qq.com>

* style: fix trailing whitespace

Signed-off-by: YZL0v3ZZ <2055877225@qq.com>

* refactor(procedure): extract deadlock detection into a testable pure function

Signed-off-by: YZL0v3ZZ <2055877225@qq.com>

* fix(procedure): preserve lock mode when detecting parent/child deadlock

Signed-off-by: YZL0v3ZZ <2055877225@qq.com>

* re-run ci check

Signed-off-by: YZL0v3ZZ <2055877225@qq.com>

---------

Signed-off-by: YZL0v3ZZ <2055877225@qq.com>
2026-03-12 09:33:55 +00:00
Ning Sun
28f97191a0 fix: make pipeline table ttl forever (#7795)
* fix: make pipeline table ttl forever

* chore: use constants when possible
2026-03-12 02:15:25 +00:00
yihong
aefe758be4 docs: update year to 2026 (#7787)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2026-03-11 07:29:35 +00:00
Weny Xu
f8376fd622 chore: bump version rc.2 (#7788)
Signed-off-by: WenyXu <wenymedia@gmail.com>
v1.0.0-rc.2
2026-03-11 06:57:07 +00:00
discord9
922f9cb3d6 feat: use dyn filter (#7545)
* parent b2074e3863
author discord9 <discord9@163.com> 1767869295 +0800
committer discord9 <discord9@163.com> 1772529023 +0800

feat: use dyn filter

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

not supported

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

refactor: use make_mut instead

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

refactor: rm need to clone stream ctx

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

r

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

pcr

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

test: wait for datafusion update

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

refactor: use arc swap for dyn filters

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

* test: update sqlness

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

* chore: comment out sqlness

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

* test: update sqlness

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

* test: sqlness fix

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

* refactor: predicate without option

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

* feat: print dyn filters& more tests

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

* test: sqlness vector result update

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

* chore: log

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

* test: properly redact

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

* test: better data dist for non empty dyn filter

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

* test: properly redacted

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

* chore: per review

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

* properly redact

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

* docs:  explain why not  do it

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

* chore: rename update to add as its more proper

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

* chore: rm no need clone

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

* docs: per review

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-03-11 03:06:24 +00:00
Ruihang Xia
9e95214fc8 feat: replace shadow-rs with self-maintained version info (#7782)
* reimplement shadow-rs

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

* fix: remove timestamp build metadata

* fix: refresh version build metadata

* use git2

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

* warn about git failure

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

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2026-03-10 21:08:26 +00:00
Weny Xu
b1b91e88f4 fix(mito2): ensure enter staging waits for compaction (#7776)
* fix: do not schedule compaction

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

* mito2: add pending ddl queue primitives to compaction scheduler

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

* mito2: hand off pending ddls on compaction finish

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

* mito2: defer enter staging via compaction pending ddl queue

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

* mito2: cover pending-ddl failure paths on region lifecycle events

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

* mito2: replay pending ddls directly in compaction handler

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

* chore: styling

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

* chore: styling

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 test

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

* chore: add unit 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-03-10 13:49:40 +00:00
Yingwen
04cd2c8a05 feat: flat read path support primary_key format memtables (#7759)
* feat: add adapter for batch to flat recordbatch

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

* feat: support batch to flat record batch in MemtableRange

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

* refactor: address review issues for BatchToRecordBatchAdapter

- Extract duplicated read_column_ids computation into a shared
  `read_column_ids_from_projection` helper function
- Cache `FormatProjection` in `BatchToRecordBatchContext::new()` instead
  of recomputing it on every `adapt_iter()` call
- Remove unnecessary `Arc` wrapping of `read_column_ids` in
  `SimpleBulkMemtable::ranges()`
- Fix clippy `filter_map_bool_then` warning in `batch_adapter.rs`

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

* chore: simplify comments

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

* refactor(mito2): use read column ids in batch adapter

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

* test: test build_record_batch_iter

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

* chore: fmt code

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

* test: test build_record_batch_iter for all old memtables

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

* chore: address comment

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

* fix: prune time range before adapter

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

* chore: share BatchToRecordBatchContext in simple_bulk_memtable.rs

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

* chore: use ScalarValue::to_array_of_size to build repeated value array

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

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-03-10 12:46:39 +00:00
Ruihang Xia
58528d1334 feat: fast path for empty selection files (#7780)
* perf(mito2): skip reader context for empty selections

* refactor(mito2): make parquet reader input optional
2026-03-10 12:22:03 +00:00
Lei, HUANG
9c98a3d5f6 refactor: remote write related code (#7775)
* refactor/prom-related-code:
 ### Commit Message

 Refactor Byte Handling and Improve Decoding Logic

 - **`prom_decode.rs`**: Removed `Bytes` usage in favor of `Vec<u8>` for handling raw data, improving memory management and simplifying the decoding process.
 - **`prom_store.rs`**: Updated `try_decompress` function to return `Vec<u8>` instead of `Bytes`, aligning with the new data handling approach.
 - **`prom_row_builder.rs`**: Modified `TablesBuilder` to use `Vec<u8>` for `raw_data`, enhancing data manipulation capabilities.
 - **`proto.rs`**: Refactored `PromWriteRequest` decoding logic to use `Vec<u8>`, optimizing the buffer management and decoding flow.

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

* refactor: mod structure

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

* refactor/prom-related-code:
 - **Refactor `prom_store.rs` and `prom_remote_write/mod.rs`:** Moved `decode_remote_write_request` and `try_decompress` functions from `prom_store.rs` to `prom_remote_write/mod.rs`. This change centralizes the logic related to remote write request
 decoding and decompression.
 - **Update `PromValidationMode` in `validation.rs`:** Implemented `Default` trait using the `#[derive(Default)]` attribute for `PromValidationMode` and updated related methods to use `Result` instead of `std::result::Result`.

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

* refactor/prom-related-code:
 ### Remove `proto.rs` and Update References

 - **Removed**: Deleted the `proto.rs` file, which contained re-exports for Prometheus remote write decode types.
 - **Updated References**: Adjusted references to `PromSeriesProcessor` and `PromWriteRequest` in `prom_decode.rs` and `prom_store.rs` to import directly from `prom_remote_write`.
 - **Modified Modules**: Removed the `proto` module from `lib.rs`.

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

* fix: lint

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

* fix: remove assert_eq

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

* refactor/prom-related-code:
 ### Refactor Prometheus Remote Write Module

 - **Modularization of `prom_remote_write`:**
   - Split `PromValidationMode` and `validate_label_name` into a new `validation` module.
   - Moved `PromSeriesProcessor` and `PromWriteRequest` to a `decode` module.
   - Separated `PromLabel` into a `types` module and adjusted visibility.

 - **Visibility Adjustments:**
   - Changed `PromTimeSeries` and `PromLabel` structs to `pub(crate)` for internal use.

 - **File Updates:**
   - Updated references in `prom_decode.rs`, `http.rs`, `prom_store.rs`, `decode.rs`, `mod.rs`, `row_builder.rs`, `types.rs`, `prom_store_test.rs`, and `test_util.rs` to reflect module changes.

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

---------

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
2026-03-10 12:19:08 +00:00
Ning Sun
2ff70fb3b6 chore: mark datafusion minor version as fixed (#7769) 2026-03-10 00:02:36 +00:00
Ning Sun
f05c48d7de chore: update oneshot (#7770) 2026-03-09 18:44:44 +00:00
Weny Xu
4c2f056f93 fix(meta): remap route addresses when reading full table info (#7778)
* refactor(meta): expose crate-level table route address remap helper

* fix(meta): remap table route address in get_full_table_info

* test(meta): cover get_full_table_info route address remap
2026-03-09 18:24:59 +00:00
Weny Xu
3e81345d7f fix(mito2): avoid parquet redownload when write cache already contains file (#7777)
* feat: add idempotent write cache download API

* fix: skip parquet redownload in manifest edit path

* test: cover download_if_absent cache hit and miss

* chore: add comments

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-03-09 12:16:53 +00:00
Yingwen
4232ce8eaa test: fix unstable index meta list test (#7774)
* test: fix unstable index meta list test

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

* fix: raise bucket_size threshold to avoid bucketing sizes in [512, 999] to 0

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

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-03-09 07:57:43 +00:00
dependabot[bot]
4dfad21883 chore(deps): bump time from 0.3.41 to 0.3.47 (#7772)
Bumps [time](https://github.com/time-rs/time) from 0.3.41 to 0.3.47.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/time-rs/time/compare/v0.3.41...v0.3.47)

---
updated-dependencies:
- dependency-name: time
  dependency-version: 0.3.47
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 06:54:58 +00:00