mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-07-10 16:00:43 +00:00
* fix(metric-engine): report query load under physical region id Propagate the physical region ID through the scanner, record batch stream, and query engine so that query-load metrics (CPU time, scanned bytes) are attributed to the correct physical region rather than always to the logical region. - `src/store-api/src/region_engine.rs` — add `query_load_region_id` to `ScannerProperties` and `set_query_load_region_id` to `RegionScanner` trait - `src/mito2/src/read/seq_scan.rs`, `src/mito2/src/read/series_scan.rs`, `src/mito2/src/read/unordered_scan.rs` — implement the new trait method on each scanner - `src/common/recordbatch/src/adapter.rs` — carry region id through `RecordBatchStreamAdapter` into `RecordBatchMetrics` - `src/table/src/table/scan.rs` — expose region id on `RegionScanExec` - `src/query/src/datafusion.rs` — extract region id from the physical plan and set it on the output stream - `src/query/src/dist_plan/merge_scan.rs` — use metrics-contained region id in query-load reporting, falling back to the logical region id - `src/metric-engine/src/engine/read.rs` — set region id on the metric engine scanner Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * fix(query): satisfy clippy for query load region id Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * fix(query): ignore missing query load region ids Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> --------- Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> Co-authored-by: Lei, HUANG <ratuthomm@gmail.com>