Commit Graph

5696 Commits

Author SHA1 Message Date
shuiyisong 589ae56a6f fix: close database ACL gaps in permission checks (#8492)
* fix: database ACL

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

* chore: reduce code

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

* fix: cr issue

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

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-07-14 14:16:08 +00:00
discord9 b30765e5e9 fix: preserve distributed topk merge ordering (#8432)
* fix: preserve distributed topk for scalar latest

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

* fix: preserve scalar latest ordering across merge scan

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

* fix: carry merge scan ordering from planner rewrite

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

* test: cover merge scan ordering metadata

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

* test: cover merge scan partition ordering gate

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

* fix: require adjacent merge sort for ordering metadata

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

* test: update ordering sqlness plans

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

* fix: preserve distributed topk merge ordering

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

* test: cover latest per series queries

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

* test: update distributed merge sort sqlness

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

* test: cover merge scan ordering partition gate

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

* test: cover merge scan over-partition ordering

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

* test: cover distributed latest with low parallelism

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

* fix: keep distributed merge sort opaque

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

* test: assert distributed scalar latest merge sort

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

* test: clarify merge scan ordering helper

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

* fix: complete merge sort exec delegation

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

* docs: explain merge sort limit pushdown

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

* test: cover merge sort optimizer opacity

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

* docs: explain merge sort optimizer hooks

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

* test: cover merge sort optimizer hooks

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

* fix: preserve merge sort child topk

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

* test: update order by topk plan

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

* fix: recognize merge sort global fetch

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-14 12:53:07 +00:00
discord9 b513dbaf4a fix: reject datanode startup on GC config mismatch (#8509)
* fix: reject datanode gc config mismatch

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

* refactor: minimize datanode gc startup check

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

* chore: update greptime-proto revision

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

* chore: use merged greptime-proto revision

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-14 12:48:13 +00:00
Weny Xu 7039e54835 fix: require metasrv GC for repartition (#8497)
* fix: require GC for repartition

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

* test: update sqlness result

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

* test: enable GC for repartition integration tests

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-14 12:04:03 +00:00
jeremyhi 9cde31a647 fix: account logical record batch slice memory (#8480)
* fix: account logical record batch slice memory

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

* fix: account nested view payload memory

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

* test: align scan memory expectation with logical size

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

* refactor: name Arrow inline view limit

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

* fix: account visible list child memory

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

* fix: exclude null list child memory

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

* fix: exclude null struct child memory

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

* fix: account fixed-size list slices

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

* fix: limit scan accounting to flat slices

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

* docs: clarify nested view accounting scope

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

* perf: reduce view memory accounting overhead

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

* chore: fix benchmark license header

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

* perf: optimize view slice accounting

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

* test: cover sliced mixed-null view accounting

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

* refactor: narrow slice accounting to arrow buffers

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

* docs: note view accounting assumption

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

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-07-14 09:35:17 +00:00
Weny Xu 1e94c3adab chore(skill): Add ca-certificates to Dockerfile (#8507)
as title
2026-07-14 09:34:27 +00:00
Ruihang Xia d494d763ee feat: enlarge file meta cache (#8499)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2026-07-14 08:46:53 +00:00
Lei, HUANG 81d8beee3a feat: clean up soft-dropped regions offline (#8458)
* fix(meta): skip reopening dropped tables during purge

Purge soft-dropped tables by dropping stored routes directly instead of
reopening tombstoned regions first. Treat legacy
\`PurgeDroppedTableState::OpenRegions\` snapshots as a compatibility-only
transition to \`DropRegions\`.

Files:
- \`src/common/meta/src/ddl/purge_dropped_table.rs\`
- \`src/common/meta/src/ddl/undrop_table.rs\`
- \`src/common/meta/src/ddl/tests/drop_table.rs\`

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

* fix(meta): guard undrop restore race

Serialize `UNDROP TABLE` with same-name creates by seeding the
original table name before procedure submission, and clean up reopened
regions when metadata restore fails.

Files:
- `src/common/meta/src/ddl/undrop_table.rs`
- `src/common/meta/src/ddl_manager.rs`
- `src/common/meta/src/ddl/tests/drop_table.rs`

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

* feat: clean up soft-dropped regions offline

Use an explicit RegionCleanUp request for purge-table cleanup so tombstoned regions can be removed without reopening them.

Route cleanup through datanode, Mito, and metric-engine offline paths, including WAL obsoletion and region directory removal.

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

* fix(datanode): reject cleanup for registered regions

Return `RegionBusy` when `RegionCleanUp` targets a region already tracked by the datanode, so offline cleanup only runs for regions without a local mapping.

Add coverage for `OfflineCleanup` engine selection and registered-region rejection.

Files:
- `src/datanode/src/region_server.rs`

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

* fix(meta): require tombstone before undrop

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

* fix(meta): reject file-engine soft drop

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

* fix: harden soft-drop cleanup paths

Reject `RegionCleanUp` for already-open Mito regions instead of turning cleanup into a drop.

Make `UndropTableProcedure` tolerate missing persisted table names and always deregister failure detectors after restore-failure cleanup.

Files:
- `src/common/meta/src/ddl/undrop_table.rs`
- `src/mito2/src/engine/open_test.rs`
- `src/mito2/src/worker/handle_open.rs`

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

* chore: bump cleanup proto dependency

Bump \`greptime-proto\` to the reviewed cleanup RPC revision and align cleanup request parsing and dispatch with the renamed \`CleanUpRequest\` payload.

Files:
- \`Cargo.toml\`
- \`Cargo.lock\`
- \`src/store-api/src/region_request.rs\`
- \`src/common/meta/src/ddl/drop_table/executor.rs\`

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

* refactor: share region cleanup helpers

Share common region cleanup helpers between normal drop and offline cleanup
while keeping their preconditions separate.

- Extract shared dropped-region runtime cleanup for `handle_drop_request` and `handle_offline_cleanup_request`.
- Share runtime artifact and manifest cache cleanup after full deletion paths.
- Make full-drop directory removal policy explicit: full drop and purge cleanup force physical deletion, while partial drop may defer to global GC.

Files:
- `src/mito2/src/worker/handle_drop.rs`
- `src/mito2/src/worker/handle_open.rs`

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

* chore: preserve soft-drop cleanup split state

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

* refactor: remove obsolete CleanUp match arm from RegionRequest

The `CleanUp` variant in the `region_request::Body` match is now handled
exclusively by `RegionServer` via a separate path. This arm would have
returned an unexpected error, so removing it eliminates dead code.

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

* fix(meta): clean every soft-dropped region replica

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

* fix(meta): order soft-drop replica cleanup

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

* Revert "fix(meta): order soft-drop replica cleanup"

This reverts commit e77162d3e5ebcf2817e2845a6a5177c328fb2c60.

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

* Revert "fix(meta): clean every soft-dropped region replica"

This reverts commit 2378e00cc258ca1b6a85a1aafbd68c79c666f43c.

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

---------

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-14 08:39:36 +00:00
LFC 0beeef7fc0 refactor: optimize json2 write, again (#8498)
refactor: optimize json2 write performance

Signed-off-by: luofucong <luofc@foxmail.com>
2026-07-14 07:09:35 +00:00
jeremyhi 0fcf61c3fb feat: skip oversized compaction tasks (#8466)
fix: skip oversized compaction tasks

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-07-14 06:50:59 +00:00
discord9 99235e4b2d fix: honor exclusive end in log queries (#8495)
* fix: exclude logs end boundary

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

* fix: normalize log query date bounds

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-14 06:19:17 +00:00
QuakeWang 5d9dddffa7 fix(flow): convert streaming expiration to milliseconds (#8481)
* fix(flow): convert streaming expiration to milliseconds

Flow EXPIRE AFTER values are stored in seconds, while streaming flow timestamps and durations use milliseconds. Passing the value through unchanged expires state and limits refill scans 1000 times too early.

Convert the value at streaming create and refill boundaries, reject overflow, and document the CreateFlowArgs unit.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>

* fix(flow): reject negative streaming expiration

Reject negative EXPIRE AFTER values at the streaming adapter boundary so refill ranges cannot move into the future. Keep zero valid and retain checked seconds-to-milliseconds conversion.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>

---------

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
2026-07-14 04:42:23 +00:00
Weny Xu 6688ca13f6 fix: disable WAL index creation by default (#8505)
Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-14 04:02:14 +00:00
Weny Xu 073ae1b184 chore: add development Docker image skill (#8477)
* chore: add development Docker image skill

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

* fix: harden development image skill

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

* fix: address development image review feedback

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

* fix: add image tag script license header

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-14 03:25:37 +00:00
Lei, HUANG 56e9158819 feat: prepare soft-drop WAL retirement (#8475)
* fix: flush soft-dropped regions on close

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

* feat(mito2): handle flush-on-close race with concurrent in-flight flush

When a region close with `flush_on_close: true` races with an
already-running flush, pass the actual close request (including the
flush_on_close flag) to the DDL handler instead of a default request
so the pending flush is correctly awaited.

Files: `src/mito2/src/worker/handle_close.rs`

Also adds a test verifying that closing with flush-on-close while a
flush is in progress still persists all written data correctly.

Files: `src/mito2/src/engine/close_test.rs`
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>

* feat: support full WAL retirement

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

* fix: complete close request migration

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

* fix: finish close request callsites

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

* refactor: guard Kafka provider setup behind index collector check

Move Kafka provider initialization and `get_or_insert` inside the
existing `if let Some(collector)` block so these operations are
skipped when no global index collector is configured.

Affected file:
- `src/log-store/src/kafka/log_store.rs`

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

* chore: avoid to_vec

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

* refactor: replace imperative close-region loop with functional combinators

Transform the region close dispatch in `DropTableExecutor` from mutable
`Vec` and `push` loops to iterator chains with `join_all`, improving
idiomatic Rust style and readability.

- `src/common/meta/src/ddl/drop_table/executor.rs` — rewired datanode
  region-close logic to use `peers.map()` and nested `join_all`, moving
  `node_manager.datanode()` inside the closure to align with the new
  structure

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

* fix: decouple Kafka client from WAL checkpoint

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

* fix: merge Kafka WAL index checkpoints

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

* fix: delegate Kafka WAL retirement to metasrv

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

* chore: rebase main and resolve conflicts

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

* fix: license header

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

* chore: bump proto to commits on main

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

* refactor: remove Kafka obsolete-all index changes

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

---------

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-13 12:32:46 +00:00
Yingwen 758664eefa fix: Use prepared file locations for CSV strict headers integration test (#8493)
fix: normalize Windows COPY test paths

Signed-off-by: Codex <codex@openai.com>
2026-07-13 10:19:57 +00:00
Ning Sun a12ad8df52 refactor: suppress region hook notifications for staging-only manifest writes (#8471)
Only fire `on_manifest_updated` for writes to the live (normal) manifest
directory. Writes to the staging directory (enter staging, operations during
staging, the intermediate apply-staging `RegionEdit`) are suppressed — their
effects accumulate and are delivered in a single notification when
`exit_staging_on_success` promotes all staged actions to the live manifest.

This simplifies hook implementations that only care about "live" state, since
they no longer receive intermediate staging notifications they cannot act on,
and no file-list information is lost (the promote step carries all accumulated
files from staging operations).

Key changes:
- `PendingManifestHook` gains an `is_staging` field; `fire()` is a no-op when
  `is_staging` is `true`
- `ManifestContext::update_locked` threads its `is_staging` parameter through
- Updated module-level docs and coverage table

Signed-off-by: Ning Sun <sunning@greptime.com>
2026-07-13 06:35:54 +00:00
Ning Sun c70cbaa132 feat: more region lifecycle hooks (#8467)
* feat: hook extension for region/file close/drop

* feat: cover region lifecycle with open/close/drop hooks

* docs(mito2): clarify on_region_opened runs in spawned task on open path

Address review feedback: the module/trait docs claimed on_region_opened
runs inline in the region worker loop. That holds for the create path
but not for the open path, where it fires inside the spawned open task
(common_runtime::spawn_global) after WAL replay and before registration.
Correct both the Notes block and the trait method doc so hook authors
don't assume worker-loop-thread affinity or strict ordering on open.

Signed-off-by: Ning Sun <sunning@greptime.com>

* docs(mito2): fix region_hook inventory and lifecycle wording

Address shuiyisong's review feedback:
- Overview no longer hardcodes 'two methods'; the lifecycle bullet list
  now includes on_region_opened.
- on_region_opened is described as firing after open/create succeeds but
  before registration (it runs before insert_region on both paths).
- on_region_closed drops the inaccurate 'follower/catchup regions'
  exclusion: remove_region fires it for any role, which is consistent
  with on_region_opened firing for followers too.

Signed-off-by: Ning Sun <sunning@greptime.com>

---------

Signed-off-by: Ning Sun <sunning@greptime.com>
2026-07-13 05:21:21 +00:00
Weny Xu 29b345fe2d ci: increase Kafka resource requests (#8482)
* ci: increase Kafka resource requests

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: WenyXu <wenymedia@gmail.com>

* ci: enable rskafka debug logs in remote WAL fuzz

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: WenyXu <wenymedia@gmail.com>

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-13 03:56:34 +00:00
shuiyisong d667728fde chore!: update promql-parser to v0.10.0, remove holt_winters (#8457)
* chore: update promql parser and fix compile

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

* fix: sqlness

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

* fix: cr issue

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

* fix: cr issue

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

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-07-13 03:27:06 +00:00
discord9 b411c6265c test: add json2 variant payload compat case (#8459)
* test: add json2 variant payload compat case

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

* test: refine json2 variant compat case

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-13 02:46:33 +00:00
dennis zhuang c12f40cec2 chore: update star history link (#8483)
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-07-11 13:13:36 +00:00
discord9 02283b6ba0 test(perf): add remote write storage inspection (#8444)
* feat: add remote write value distributions

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

* test: extend remote write value distributions

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

* test: inspect remote write parquet storage

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

* test: normalize remote write perf fixtures

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

* test: add heavy remote write perf case

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

* test: use head greptime for read bench

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

* test: keep heavy remote write case local

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

* test: tune remote write perf smoke case

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

* test: fix query fixture import style

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

* test: cover remote write value distributions

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

* test: add integer counter perf case

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-10 12:27:27 +00:00
jeremyhi 03b304522f refactor: model distributed inspect fan-in as exec (#8447)
* refactor: model distributed inspect fan-in as exec

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

* fix: harden distributed inspect exec fan-in

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

* fix: show distributed inspect scan in plans

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

* fix: stabilize distributed inspect sqlness

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

* fix: apply sqlness replacement to inspect explain

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

* fix: redact inspect repartition plan

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

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
v1.1.2-0783225e0-20260710-1783671342
2026-07-10 08:53:23 +00:00
Weny Xu 29423f8ad8 ci: check kafka readiness before fuzz tests (#8461)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Signed-off-by: WenyXu <wenymedia@gmail.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-10 06:40:16 +00:00
discord9 ff2fa71d50 fix: repartition subset partition key joins (#8460)
Signed-off-by: discord9 <discord9@163.com>
2026-07-10 06:10:28 +00:00
raphaelroshan 74bdb1f2a8 fix: compare all LoggingOptions fields in PartialEq (#8449)
* fix: compare all LoggingOptions fields in PartialEq

Signed-off-by: raphaelroshan <raphaelroshan@gmail.com>

* test: set otlp_export_protocol in load_config_test expected configs

The example configs set otlp_export_protocol = "http", but the expected
LoggingOptions blocks for datanode/frontend/metasrv/standalone left it at
the default None. Now that PartialEq compares all fields, add the field to
match the parsed configs (as the flownode case already does).

Signed-off-by: raphaelroshan <raphaelroshan@gmail.com>

---------

Signed-off-by: raphaelroshan <raphaelroshan@gmail.com>
2026-07-10 05:46:20 +00:00
QuakeWang 4e14ac8676 feat: add strict CSV header validation (#8426)
* feat: add strict CSV header validation

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>

* style: simplify strict header parse error

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>

---------

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
2026-07-10 02:15:08 +00:00
discord9 e6472fd12a fix: pause GC during maintenance mode (#8450)
Skip scheduled meta GC while cluster maintenance mode is enabled and reject manual GC requests explicitly instead of returning an empty success report.

Also increase mito GC's default lingering time to 1h and update generated config docs and config API expectations.

Signed-off-by: discord9 <discord9@163.com>
2026-07-09 10:09:37 +00:00
Weny Xu ffd64880eb feat: add fuzz CI failure investigation skill (#8456)
* feat: add fuzz CI failure investigation skill

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: WenyXu <wenymedia@gmail.com>

* docs: make fuzz CI skill commands robust

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: WenyXu <wenymedia@gmail.com>

* docs: refine fuzz CI skill review commands

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: WenyXu <wenymedia@gmail.com>

* docs: harden fuzz CI artifact fallback

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: WenyXu <wenymedia@gmail.com>

* docs: address fuzz CI skill review comments

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Signed-off-by: WenyXu <wenymedia@gmail.com>

* docs: address remaining fuzz CI skill reviews

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-07-09 09:32:07 +00:00
shuiyisong 7764d2f054 chore: make OTLP trace ingest chunk size configurable (#8455)
* chore: expose trace chunk to config

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

* chore: change default value to 128

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

* fix: cr issue

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

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-07-09 08:22:40 +00:00
LFC 6ae687dc8e refactor: optimize json2 write (#8393)
refactor: optimize json2 write performance

Signed-off-by: luofucong <luofc@foxmail.com>
2026-07-09 07:08:57 +00:00
jeremyhi 59e4e7efda fix: preserve close-time flush responses (#8443)
* fix: preserve close-time flush responses

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

* test: make close flush race regression deterministic

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

* fix: notify waiters when scheduled flush jobs are dropped

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

* fix: complete pending close after close-time flush

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

* fix: return retryable flush scheduling errors

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

* fix: notify pending bulk writes on flush cleanup

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

* fix: keep writes fenced during close-time flush

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

* fix: queue close after noop wal flush

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

* fix: remove close-specific flush completion path

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

* fix: close region on close-time flush

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

* fix: fail close when follow-up flush cannot start

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

* fix: fence writes during close-time flush

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

* fix: notify listener before follow-up flush

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

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-07-09 04:08:11 +00:00
discord9 81e32eb1b5 test: add auto flush interval compat case (#8448)
Signed-off-by: discord9 <discord9@163.com>
2026-07-09 03:06:14 +00:00
fys a7d564124d feat(json2): encode json2 variant payloads as jsonb (#8435)
* feat: encode json2 variant payloads as jsonb

* feat: encode json2 variant payloads as jsonb

* minor refactor

* fix: cargo check

* fix: unit test

* fix: cr
2026-07-08 11:27:42 +00:00
discord9 149b687a92 fix: preserve repartitioned file refs during GC (#8445)
* fix: preserve repartitioned file refs during GC

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

* refactor: clarify file refs target region

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-08 08:33:02 +00:00
Lei, HUANG af51651b64 fix: collect lightweight query-load metrics (#8437)
- Performance: add collect_lightweight_query_load_metrics to walk the
  physical plan and read raw metric values without invoking MetricCollector's
  plan-node formatting on the normal query hot path before EOF.
- Refactor: extract collect_full_metrics and keep full aggregation/formatting
  for verbose analyze output and terminal metrics.
- Test: cover lightweight partial metrics and drop-time query stats reuse.

Files: src/common/recordbatch/src/adapter.rs

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-08 07:07:38 +00:00
jeremyhi f12a1da3de fix: upgrade datafusion fork (#8438)
Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-07-08 06:04:13 +00:00
fys 3bf8b9722d feat(json2): validate append mode for tables with JSON2 columns (#8434)
* feat: validate append mode for JSON2 tables

* fix: cr by codex

* fix: unit test

* fix: validate JSON2 append_mode for all ALTER TABLE operations
2026-07-08 03:33:36 +00:00
sun ebfe4f6eb2 feat: update dashboard to v0.13.7 (#8431) 2026-07-07 23:39:43 +00:00
Weny Xu fb1c40e466 chore(ci): stabilize remote wal fuzz tests (#8436)
fix: extend remote wal kafka timeout in fuzz tests

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-07 13:28:00 +00:00
Lei, HUANG 1cc4038880 fix: spawn read operations on query runtime (#8433)
Ensure read requests from `RegionServer` are dispatched to the query
runtime via `common_runtime::spawn_query` instead of executing on the
calling thread. This prevents runtime contention and keeps read
processing on the designated query runtime.

Affected file:
- `src/datanode/src/region_server.rs`

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-07 11:47:05 +00:00
discord9 b6438d3ea2 fix(flow): rebind stale snapshot fence (#8409)
* fix(flow): rebind stale snapshot fence

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

* refactor(flow): avoid repeated stale fence error formatting

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-07 08:36:39 +00:00
discord9 12f83828b1 feat: add Prom remote-write query regression scenario (#8413)
* feat: add Prom remote-write query regression scenario

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

* test: add high-cardinality remote-write query case

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

* feat: chunk remote-write query regression loads

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

* test: use multi-day remote-write regression case

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

* fix: address query regression review comments

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

* ci: allow large query regression comments

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-07 07:58:56 +00:00
sribatsha dash 8f5d681e4b feat: support ALTER TABLE SET auto_flush_interval (#8403)
* feat: support ALTER TABLE SET auto_flush_interval

Closes #8394.

Add a new SetRegionOption::AutoFlushInterval variant so that the
per-table auto flush interval can be changed on existing tables
via 'ALTER TABLE t SET ...', following up the CREATE TABLE path
from #8357.

- region_request.rs: parse 'auto_flush_interval' with humantime and
  map it to the new variant.
- metadata.rs: persist the value (or remove it, if None) in
  TableOptions.extra_options using the same humantime string format
  the engine already expects.
- handle_alter.rs: apply the new interval in
  handle_alter_region_options_fast (no memtable flush needed, same
  pattern as Ttl) and group the variant with Ttl/Twsc in
  new_region_options_on_empty_memtable.

Tests:
- Two unit tests in metadata.rs covering set and unset-to-None.
- A new sqlness case alter_auto_flush_interval.sql covering
  create-then-alter, alter-then-alter, invalid duration, and
  alter on a table that already had auto_flush_interval at create
  time.

Signed-off-by: srivtx <crypticcc101@gmail.com>

* fix: validate auto_flush_interval > 0 in ALTER SET path

Gemini code assist flagged that the request parser accepted a zero
duration, leaving the rejection to the downstream RegionOptions
validation which only fires on next flush. Reject it at parse time
so users get the error immediately at the ALTER TABLE statement.

Also add a '0s' error case to the sqlness test.

Signed-off-by: srivtx <crypticcc101@gmail.com>

* fix: handle SET 'auto_flush_interval' = NULL and add checked-in .result

Address the rest of fengjiachun's review on #8403:

1. Empty value in ALTER SET clears the override (parallels Ttl).
   'ALTER TABLE t SET ... = NULL' comes through as value = ''; we
   now return AutoFlushInterval(None) so the override is removed
   from TableOptions.extra_options, matching the Ttl pattern.

2. Add a unit test in region_request.rs covering the four cases
   (valid, empty-clears, zero-rejected, garbage-rejected).

3. Generate and check in alter_auto_flush_interval.result via
   'cargo sqlness-runner bare -t alter_auto_flush_interval'. Both
   the standalone and distributed sqlness jobs now pass locally,
   and the test extension covers the NULL-clears path end to end.

Signed-off-by: srivtx <crypticcc101@gmail.com>

---------

Signed-off-by: srivtx <crypticcc101@gmail.com>
2026-07-07 07:34:05 +00:00
discord9 9936a83384 feat(query): add runtime provider interface (#8386)
* feat(query): add runtime provider interface

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

* docs(query): document runtime provider interface

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

* feat(query): pass runtime builder to provider

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

* fix(query): make runtime provider fallible

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

* fix(query): propagate runtime provider errors

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-07 07:18:23 +00:00
fys 63cc232339 chore: add sqlness regression for timestamp precision comparison (#8424)
* test: add sqlness regression for timestamp precision comparison

* add result
2026-07-07 06:45:55 +00:00
discord9 c8c7e77cc3 test: add ssts limit compat case (#8427)
Signed-off-by: discord9 <discord9@163.com>
2026-07-07 03:41:22 +00:00
discord9 1d819a3982 test: add comment metadata compat case (#8402)
Signed-off-by: discord9 <discord9@163.com>
2026-07-07 02:27:55 +00:00
discord9 d8f692f4c5 ci: run query regression on self-hosted runners (#8423)
* ci: run query regression on self-hosted runners

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

* ci: use dedicated perf regression runner labels

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

* ci: keep query regression runner scale set minimal

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

* ci: use custom query regression runner image

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

* ci: host query regression runner image in acr

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

* ci: harden query regression runner workflow

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

* ci: avoid runner uid assumptions in values

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

* ci: fix query regression comments for fork prs

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

* ci: address query regression review comments

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-06 13:12:18 +00:00