Commit Graph

5836 Commits

Author SHA1 Message Date
Lei, HUANG 27462eaaf0 test(object-store): fix racy SecureFs abort test (#8720)
test_writer_abort_is_unsupported_without_atomic_write asserted the file
content immediately after abort() returned Unsupported. SecureFsWriter
writes through tokio::fs::File, whose write_all() only enqueues a blocking
write task (tokio's poll_write returns Ready before the write completes),
so the data may not be visible yet when the test reads the file. Drop the
race-prone content assertion and only verify the Unsupported contract.

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-08-03 02:36:56 +00:00
dennis zhuang 00829903cf fix(auth): warn when credential load disables Postgres SCRAM or drops a line (#8652)
* fix(auth): warn when credential load disables Postgres SCRAM or drops a line

Static and watch user providers degraded silently in two ways:

- A single non-SCRAM verifier (mysql_native_password, or a legacy
  pbkdf2_sha256 hash that predates SCRAM) disables Postgres SCRAM for
  every user and falls back to cleartext, with no signal to the operator.
- A malformed credential line (commonly a plaintext password containing
  '=', which splits into more than two parts) was dropped without a trace.

Emit a warning at each credential load for both cases so operators don't
unknowingly serve cleartext passwords over Postgres or lose a user. This
is logging only; authentication behavior is unchanged. The SCRAM check
never logs secrets, and the malformed-line warning logs the line number
and file, never the line content.

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

* fix(auth): warn on credential file read error before truncating

A read error from lines() (I/O failure or invalid UTF-8) ends the
iterator via map_while, silently dropping every remaining credential.
Warn with the line number and file before truncating, matching the
malformed-line handling, so the drop is observable.

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

---------

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-08-02 03:33:43 +00:00
Lei, HUANG aec7ba34c9 fix(mito2): prioritize newer compaction windows (#8714)
* fix(mito2): prioritize newer compaction windows

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

* test(mito2): adapt window priority test after rebase

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

* fix(mito2): update compaction picker test

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

---------

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-08-01 04:24:49 +00:00
Lei, HUANG ff7e7f13b8 fix(mito2): limit compaction picker threads (#8704)
* fix(mito2): limit compaction picker threads

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

* refactor(mito2): extract TWCS input picking

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

* refactor(mito2): make compaction picker async

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

* refactor(mito2): remove redundant build_output test helper

After making the compaction picker async and extracting TWCS input
picking, the test-only build_output helper is just a thin wrapper around
build_output_with_time_range. Drop it and call the full method directly
from tests.

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

* docs: correct compact runtime config wording

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

* test(runtime): harden compact blocking limit check

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

---------

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-31 15:15:55 +00:00
Weny Xu ad2c1bfc59 fix(meta): preserve legacy WAL options compatibility (#8707)
* fix: preserve legacy region WAL options format

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

* test: add downgrade compatibility coverage

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

* refactor: deduplicate compat restart

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

* test: harden downgrade compatibility check

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-31 13:40:27 +00:00
jeremyhi 448f973593 fix: sandbox SQL local filesystem access (#8708)
* fix: sandbox SQL local filesystem access

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

* fix: address local file sandbox review findings

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

* fix: support Windows local copy paths

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

* fix: improve sandbox path errors

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

* refactor: simplify local path error context

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

* perf: stream secure filesystem listings

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

* style: derive local file access default

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

* fix: improve local file access errors

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

* fix: address local file access review findings

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

* test: simplify local file access coverage

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

* fix: harden sandboxed local file backends

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

* fix: reject directory copy targets before creation

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

* fix: avoid implicit string clone in file table listing

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

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
2026-07-31 13:23:15 +00:00
Weny Xu 1aa35716cb refactor(event): store procedure trigger as JSONB (#8700)
* refactor(event): store procedure trigger as JSONB

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

* test(event): fix JSONB procedure trigger assertions

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

* refactor(event): remove procedure trigger display

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

* test(event): update batch GC trigger assertions

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-31 13:22:26 +00:00
LFC 4e04f92591 fix: make select whole json2 column worked (#8683)
* fix: make select whole json2 column worked

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

* resolve PR comments

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

* x

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

---------

Signed-off-by: luofucong <luofc@foxmail.com>
2026-07-31 13:14:33 +00:00
Yingwen 25090b9f54 feat(mito2): support cancelling flush jobs (#8685)
* feat(mito2): support cancelling flush jobs

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

* refactor(mito2): refine flush cancellation handling

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

* fix(mito2): handle ambiguous manifest update errors

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

* test(mito2): reduce cancellation test duplication

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

* fix(mito2): fail pending writes after flush failure

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

* refactor(mito2): remove redundant cancellation check

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

* fix(mito2): validate drop before cancelling flush

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

---------

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-07-31 12:02:28 +00:00
discord9 c52db42b61 test: stabilize remote dynamic filter left join e2e (#8711)
test: stabilize remote dynamic filter left join

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-07-31 10:56:52 +00:00
dennis zhuang 81a0dd77c7 fix(mito2): fence async index builds by schema generation (#8697)
* fix(mito2): fence async index builds by schema generation

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

* fix(mito2): retry stale index builds after schema changes

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

---------

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-07-31 09:29:06 +00:00
shuiyisong 88606f0dff fix(metric-engine): prevent stale metadata cache fills (#8699)
* fix: metric engine cache

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

* fix: cr issue

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

* fix: leak cache

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

* chore: add comment

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

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-07-31 07:40:51 +00:00
Weny Xu 8f11629e34 feat(metasrv): add batch GC lifecycle events (#8673)
* feat(metasrv): add batch GC lifecycle events

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

* fix(metasrv): reduce batch GC event fanout

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

* fix(metasrv): fix batch GC event import

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

* fix(metasrv): refine batch GC events

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

* fix(metasrv): preserve batch GC reports on failure

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

* fix(metasrv): retain batch GC reports on retry

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

* fix(metasrv): harden batch GC report merging

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

* test: scope repartition SST assertions to target table

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-31 07:13:56 +00:00
shuiyisong c3d8c976a2 feat(query): add native histogram result plumbing (#8693)
* feat(query): add native histogram result plumbing

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-31 03:14:48 +00:00
Lei, HUANG eb8ae171cc refactor(mito2): split compaction scheduler modules (#8698)
* refactor(mito2): split compaction module into scheduler/reader submodules

Extract the compaction scheduler lifecycle (scheduler, status, phases,
execution, SST reservations, pending requests) and its tests out of
compaction.rs into compaction/scheduler.rs and compaction/scheduler_test.rs.

Split the remaining helpers by responsibility:
- estimate_compaction_bytes/refresh_picker_output move to scheduler.rs,
  the only call site
- get_expired_ssts moves to picker.rs, shared by the TWCS and window
  pickers
- CompactionSstReaderBuilder/time_range_to_predicate/ts_to_lit move to
  the new compaction/reader.rs

The root compaction.rs keeps the shared output types and
find_dynamic_options, and re-exports the moved types so existing call
paths stay unchanged. Pure code motion, no behavior change.

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

* refactor(mito2): separate compaction scheduling from execution details

Turn compaction/scheduler.rs into a directory module to make the
scheduling flow easier to review:

- scheduler.rs keeps the pure scheduling core: the CompactionScheduler
  state machine, scheduling entry points, termination chaining, DDL
  coordination and region lifecycle events
- scheduler/planning.rs holds the execution-facing parts: background
  planning dispatch, picker invocation, plan acceptance, remote/local
  submission and memory estimation
- scheduler/state.rs holds the per-region lifecycle types:
  CompactionStatus, ActiveCompaction, CompactionPhase, CompactingFiles,
  LocalCompactionState, CompactionExecution and PendingCompaction

Child modules keep access to the scheduler's private methods, so the
split is pure code motion with minimal visibility changes (pub(super)
only where the parent module or tests reach into child items).
No behavior change.

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

* refactor(mito2): use absolute scheduler imports

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

* docs(mito2): document compaction scheduler modules

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

---------

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-31 02:46:05 +00:00
shuiyisong 00f0dcc663 refactor: replace endpoint permission variants with named actions (#8692)
* refactor: perm enum

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

* refactor: use typed actions

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

* fix: pub structs

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

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-07-30 10:19:48 +00:00
Weny Xu 979a22b38a feat(metasrv): record WAL prune procedure events (#8677)
* feat(metasrv): record WAL prune procedure events

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

* feat(metasrv): expand WAL prune procedure events

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

* fix: fix toml fmt

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

* fix(metasrv): clarify WAL prune event semantics

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-30 09:09:27 +00:00
Ning Sun 0f4a4bcdb7 chore: update flake to use zlib (#8691)
* chore: update flake to use zlib

* chore: minor housekeeping
2026-07-30 08:52:51 +00:00
dennis zhuang f817690b82 fix(mito2): make async index publication conditional (#8676)
* fix(mito2): make async index publication conditional

Check the captured SST generation and commit index metadata under the same manifest write lock. Revalidate the committed metadata before applying it to the in-memory version, and clean exact-version artifacts when either publication stage becomes stale.

Add deterministic compaction and overlapping-index tests covering reopen consistency, duplicate rows, cache cleanup, and both file purgers.

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

* refactor(mito2): centralize manifest update finalization

Share the locked update, lock release, follower check, and hook firing path between regular manifest updates and conditional index publication.

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

* fix(mito2): retain index build leases across reopen

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

* fix(mito2): avoid retiring scheduler on index failure

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

* fix(mito2): handle cross-region index publication

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

* fix(mito2): use physical region for index paths

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

* fix(cmd): update noop index builder

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

* fix(mito2): avoid reusing published index versions

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

* chore(mito2): log untracked index build stops

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

* fix(mito2): set compaction time range in index test

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

---------

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-07-30 08:50:01 +00:00
Ning Sun bf187291c1 feat: expose MitoRegion::all_manifest_files for metadata rebuild (#8680)
* feat: expose MitoRegion::all_manifest_files for metadata rebuild

Adds a public read-only accessor that returns all live SST file metas
and the current manifest version from the region manifest. Used by the
downstream project admin path to enumerate the authoritative live file
set without going through the worker loop.

* fix(mito2): merge staging manifest files in all_manifest_files

The original implementation only read the normal manifest
(manifest_ctx.manifest()) and skipped staging_manifest(). While the
region is in staging mode (e.g. region copy/migration), the authoritative
live file set lives in the staging manifest, so callers would silently
miss those files.

Now matches the semantics of manifest_sst_entries() (~L771), which
explicitly merges manifest().files with staging_manifest().files via a
HashMap collect (dedup by FileId). The returned manifest version is the
staging version when a staging manifest is present, otherwise the normal
manifest version.

Also removed downstream-specific references from the rustdoc comments.
2026-07-30 08:10:52 +00:00
discord9 e66d56d1f9 fix(query): handle empty operands in PromQL or (#8502)
* fix(query): handle empty operands in PromQL or

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

* fix(query): preserve schema for empty histograms

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

* fix(query): preserve set operation context

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

* refactor(query): simplify zero-column error

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-30 07:58:37 +00:00
Yingwen 2c9c695a4d refactor(mito2): add prerequisites for range-based series reads (#8679)
refactor(mito2): prepare range-based series reader

Signed-off-by: evenyag <realevenyag@gmail.com>
2026-07-30 07:30:41 +00:00
Weny Xu 6de01f17da ci: limit fuzz test parallelism (#8690)
Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-30 07:13:04 +00:00
discord9 5ed7128f06 perf(query): prune RangeSelect input projections (#8570)
* perf(query): prune RangeSelect input projections

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

* test(query): stabilize RangeSelect projection snapshot

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

* test(query): update RangeSelect nested plan snapshot

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

* fix(query): handle nested RangeSelect aliases

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-30 07:09:49 +00:00
discord9 32be67c024 fix(query): use physical partition types for metric route pruning (#8590)
* fix(query): prune logical metric regions after repartition

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

* fix(query): centralize conservative region pruning

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

* refactor(query): extract pruning metadata helper

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

* docs(query): explain pruning metadata helper

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

* docs(query): clarify pruning metadata mismatch

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-30 07:05:38 +00:00
discord9 9776d88dc8 fix: preserve dictionary regex filter semantics (#8688)
* fix: preserve dictionary regex filter semantics

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

* test(query): update dictionary regex plan results

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-30 06:20:57 +00:00
fys 3a904f332f fix(json2): standardize widening and projection cast semantics (#8661)
* fix(json2): standardize widening and projection cast semantics

Signed-off-by: fys <fengys1996@gmail.com>

* fix: cargo clippy

Signed-off-by: fys <fengys1996@gmail.com>

* fix: typos

Signed-off-by: fys <fengys1996@gmail.com>

* fix: unit test

Signed-off-by: fys <fengys1996@gmail.com>

* feat: add fast-path

Signed-off-by: fys <fengys1996@gmail.com>

* remove unsed code

Signed-off-by: fys <fengys1996@gmail.com>

* refactor(json2): project nested json_get paths with JsonArray

Signed-off-by: fys <fengys1996@gmail.com>

* fix(query): reject projecting whole JSON2 columns

Signed-off-by: fys <fengys1996@gmail.com>

* fix(query): reject whole-column JSON2 reads

Signed-off-by: fys <fengys1996@gmail.com>

* test(json2): organize limitation sqlness cases

Signed-off-by: fys <fengys1996@gmail.com>

* fix: sqlness test

Signed-off-by: fys <fengys1996@gmail.com>

---------

Signed-off-by: fys <fengys1996@gmail.com>
2026-07-30 04:08:53 +00:00
Weny Xu 47ca5c362e feat: add table DDL procedure events (#8627)
* feat(meta): emit table DDL procedure events

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

* fix(meta): honor table DDL event filters

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

* test(meta): cover table DDL event filters

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

* refactor(meta): align table DDL event conventions

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

* refactor(meta): bound table DDL event payloads

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

* test(meta): consolidate table DDL event tests

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

* style(meta): use crate visibility in event tests

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

* test: stabilize table DDL event assertions

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

* fix(meta): exclude repartition from alter table events

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

* fix(meta): resolve table event rebase conflicts

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-30 03:24:47 +00:00
discord9 64c66f0a6b chore(deps): pin timestamp widening preimage fix (#8686)
Signed-off-by: discord9 <discord9@163.com>
2026-07-30 02:29:35 +00:00
sun 2ed3c3c43f feat: update dashboard to v0.13.10 (#8687) 2026-07-29 14:44:10 +00:00
Ning Sun 8098009532 chore: update nix flake to 26.05 (#8681) 2026-07-29 13:44:58 +00:00
Lei, HUANG f524a0b5b4 feat: support time range in manual compaction (#8669)
* feat: support time range in manual compaction

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

* fix: reject overflowing compaction range alignment

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

* fix: preserve range across compaction continuations

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

* perf: use graph traversal for compaction windows

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

* chore: bump proto to commit on main

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

* docs: explain compaction window dependency closure

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

---------

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-29 13:33:10 +00:00
Weny Xu 31f9a9a6fd feat(metasrv): add repartition lifecycle events (#8665)
* feat(metasrv): add repartition lifecycle events

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

* refactor(metasrv): simplify event module names

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

* fix(procedure): emit submitted events for child procedures

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

* refactor(metasrv): flatten repartition event payload

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

* refactor(metasrv): defer repartition topology rows

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

* fix(procedure): avoid events on failed child spawn

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-29 13:15:43 +00:00
dennis zhuang cecb2d93a2 fix(repartition): enforce GC across lifecycle (#8678)
* fix(repartition): enforce GC across lifecycle

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

* refactor(repartition): narrow GC recovery enforcement

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

* fix(metasrv): avoid repeated GC preflight during bootstrap

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

* docs(metasrv): clarify legacy GC reconciliation

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

---------

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-07-29 12:04:16 +00:00
dependabot[bot] 71fd9661c7 chore(deps): bump quinn-proto from 0.11.14 to 0.11.16 (#8675)
Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.11.14 to 0.11.16.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.14...quinn-proto-0.11.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-29 09:25:51 +00:00
shuiyisong 2afcd4a558 fix: enforce permissions for restricted HTTP endpoints (#8672)
* chore: add perm check

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

* fix: CR issues

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

* chore: add comments

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

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
2026-07-29 08:51:17 +00:00
sun 1a24a6e782 feat: update dashboard to v0.13.9 (#8674) 2026-07-29 07:32:16 +00:00
discord9 26b08f815f fix(mysql): fail closed on unrepresentable timestamps (#8580)
* fix(mysql): reject unrepresentable timestamps

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

* fix(mysql): validate timestamp protocol boundaries

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

---------

Signed-off-by: discord9 <discord9@163.com>
2026-07-29 07:04:31 +00:00
Lei, HUANG 1e9d70fa5c feat: record metrics for timed out explain analyze (#8668)
* feat: record metrics for timed out explain analyze

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

* fix: update event recorder test implementations

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

* fix: keep timeout metrics payload shape stable

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

---------

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-29 06:47:40 +00:00
Ning Sun deb688f572 feat: add a dedicated http api server port (#8657)
* feat: add a dedicated http api server port

* fix: integration test

* refactor: make http-api-port opt-in

* refactor: rename attribute to http-api-server

* feat: use middleware to check different http server port

* refactor: rename config option
2026-07-29 03:31:49 +00:00
Weny Xu 8ca6132b84 feat: add events for create and drop view (#8626)
* feat(procedure): add view ddl events

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

* test(procedure): satisfy view event clippy

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

* feat(meta): add view DDL procedure events

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

* test(meta): group view event tests

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

* refactor(meta): align view DDL events

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

* refactor(meta): centralize view event schema

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

* test(integration): use singular view event module

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

* test(integration): align view event assertions

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

* test(integration): share DDL event assertions

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

* docs: document view event recorder types

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

* refactor(meta): align view DDL event conventions

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

* test(meta): simplify view event tests

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-29 03:13:44 +00:00
Lei, HUANG 98612800ad perf(mito2): make compaction picker asynchronous to avoid blocking the region worker (#8624)
* refactor(mito2): run compaction picking in background with plan tracking

Move the compaction picker out of the region worker's critical path by
dispatching planning to a background task and reporting the result back
via CompactionPickFinished. CompactionStatus now tracks an explicit
picking phase keyed by a monotonic plan id, so stale planning results
are rejected and duplicate regular triggers coalesce while picking.

Before submitting a prepared compaction, the picker output is refreshed
against the current SST version (file handles are re-resolved and
conflicts roll back reservations), ensuring the plan still matches live
state. CompactionExecution identifies the running task by
(plan id, kind, version control) so finish/cancel/fail notifications
from outdated executions are ignored.

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

* fix(mito2): notify pick finished even when compaction planning panics

The worker only leaves the picking phase after receiving the
CompactionPickFinished notification. Previously the planning task was
spawned fire-and-forget: if it panicked before sending the notification,
the region would be stuck in the picking phase forever, blocking all
future compactions and pending DDLs (e.g. entering staging) of the
region.

Wrap the planning future with catch_unwind so a panic is converted into
a CompactionPlanningResult::Error and the notification is always sent,
letting the worker run the normal error cleanup path.

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

* fix(mito2): dec inflight compaction gauge after re-entrancy guard

DefaultNotifier::notify decremented INFLIGHT_COMPACTION_COUNT before the
re-entrancy guard, so a duplicate notify (which should never happen, but
the guard exists to defend against it) would decrement the gauge an
extra time and let it drift negative. Move the decrement after the
guard, matching the local compaction path's guard-then-account order.

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

* fix(mito2): remove idle compaction status to prevent zombie state

When a compaction finished within min_compaction_interval with no
pending requests, on_compaction_finished left an idle status
(phase = None) behind. The worker then skipped chaining the next
compaction due to the interval gate, and the leftover status made
schedule_compaction swallow all future triggers of the region: regular
waiters were queued but never woken, and manual requests stayed pending
forever. The region stopped compacting until close/drop/truncate.

Add CompactionScheduler::remove_idle_status and call it from
handle_compaction_finished when the interval has not elapsed and no
chained planning is scheduled. The chain-until-no-plan semantics for
compactions that outlast the interval is preserved.

Also drops an unused import left by the previous commit.

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

* refactor(mito2): make compaction scheduling methods synchronous

schedule_compaction, handle_pending_compaction_request and
schedule_next_compaction no longer await anything after compaction
planning became fire-and-forget. Drop the async signature to make the
no-suspension-point invariant explicit: these methods always run to
completion on the worker loop without reentrancy.

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

* fix(mito2): report stale compaction execution instead of region closed

When a compaction finishes but its execution no longer matches the
current one, the region may have been reopened or truncated, or the
compaction was superseded. Reporting RegionClosed to waiters is
misleading; introduce a neutral StaleCompactionExecution error (same
Cancelled status code) for this case.

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

* fix(mito2): serialize truncate with compaction

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

* fix(mito2): avoid panic-based compaction status lookups

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

* fix(mito2): keep in-flight compaction plan when scheduling next

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

* fix(mito2): notify cancelled compaction pending ddl

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

* typo: rename prefence to pre_fence to bypass typo check

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

* test(mito2): trim redundant compaction tests

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

* test(mito2): move compaction tests to dedicated file

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

* fix: typo and format

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

* Revert "test(mito2): move compaction tests to dedicated file"

This reverts commit e202f1f5

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

* chore: revert test movement

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

* fix(mito2): remove redundant compaction status lookups

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

* fix: typo

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

* test(mito2): remove duplicate compaction test file

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

* test(mito2): prune redundant compaction tests

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

* refactor(mito2): simplify compaction plan identity

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

* docs(mito2): design pending regular state simplification

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

* docs(mito2): plan pending regular state simplification

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

* refactor(mito2): simplify pending regular compaction state

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

* remove: plan files

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

* refactor(mito2): clarify compaction completion handling

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

* refactor(mito2): inline compaction phase execution lookup

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

* fix(mito2): warn instead of panic on pending DDL for non-compacting region

add_ddl_request_to_pending unwrapped the region status and panicked when
the region was not compacting. Log a warning and skip the request instead,
and inline the now-trivial CompactionStatus::queue_ddl helper.

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

* fix(mito2): dispatch pending DDLs before chaining regular compaction

A DDL queued behind a TooLateToCancel compaction (commit started or
remote execution) was deferred behind a whole extra plan/execution
cycle when a regular trigger had been retained during picking. Dispatch
the pending DDLs as soon as the current task finishes instead: satisfy
the retained regular waiters with the just-finished compaction, remove
the region status, and return the DDLs immediately.

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

* fix(mito2): demote stale compaction failure logs to debug

Check region presence and execution staleness before logging, so a
superseded execution's terminal failure no longer emits a misleading
error log.

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

* refactor(mito2): atomically queue compaction DDLs

Combine compaction cancellation and dependent DDL enqueueing under one
status borrow. Return the typed request unchanged when no compaction is
running, avoiding both an unreachable warning branch and silent DDL
loss if the invariant changes.

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

* docs(mito2): explain why picker output handles are re-resolved

Addresses review question on refresh_picker_output: picking runs in
background on a possibly-stale version snapshot, so handles must be
re-resolved against the current version at accept time to detect
removed files and to read/reserve the up-to-date handle.

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

* refactor(mito2): keep compaction gate in test module

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

* style(mito2): format compaction DDL helper calls

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

* refactor(mito2): group active compaction state

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

* fix(mito2): fence compaction triggers behind pending DDL

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

* refactor(mito2): simplify pending DDL collection in compaction scheduler

Replace the take-and-restore dance of the active compaction state with
an up-front busy check before handling pending compaction requests,
then take the active state once to drain DDL waiters.

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

* docs: clarify that pending_request only carries manual StrictWindow compaction in production

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

* fix(mito2): arm DDL gate before cancellation

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

---------

Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-28 15:02:06 +00:00
shuiyisong 08537b5eaf feat(promql): add native histogram functions (#8664)
* feat(promql): add native histogram functions

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

* chore: rebase main

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-28 14:08:42 +00:00
Lei, HUANG b1e0da9578 fix(mito2): suppress empty compaction skip logs (#8667)
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
2026-07-28 13:41:08 +00:00
LFC 4acd2340c7 feat: add extra http router provider in metasrv plugin (#8662)
Signed-off-by: luofucong <luofc@foxmail.com>
2026-07-28 11:51:08 +00:00
sun cfa9e95c1d feat: update dashboard to v0.13.8 (#8666) 2026-07-28 11:48:21 +00:00
discord9 255572020a fix: scope live analyze metrics to streaming requests (#8644)
Signed-off-by: discord9 <discord9@163.com>
2026-07-28 09:19:23 +00:00
Weny Xu 775a9af3b8 feat: add procedure events for Flow DDL (#8632)
* feat(meta): record Flow DDL procedure events

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

* fix(meta): remove query schema from Flow events

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

* fix(tests): fix Flow DDL event test

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

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
2026-07-28 09:02:11 +00:00
Yingwen 7da4f46532 fix: configure datanode client gRPC message limits (#8642)
Signed-off-by: evenyag <realevenyag@gmail.com>
2026-07-28 08:35:42 +00:00
shuiyisong 046921a72c feat(common-query): add native histogram runtime model (#8656)
* feat(common-query): add native histogram runtime model

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

* chore: rebase main

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-28 07:50:46 +00:00