Report the progress of an active query
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- backend, distributed-systems, observability
Direzione di ricerca
Start with beacon-db/beacon-core/src/runtime.rs to trace how run_query creates and drops the stream, then read beacon-db/beacon-core/src/metrics.rs and beacon-db/beacon-file-formats/beacon-arrow-atlas/src/datafusion/metrics.rs for the live metrics. Coordinate the registry and partial-row design with issue #484 and the related cancellation work in #483. Done means active queries can be read and sampled for slow-query logs, with entries removed when streams drop.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What is missing
Beacon holds no record of an active query. A slow query stays invisible until it ends.
Two questions have no answer today. What runs now? How far along is it?
The query store receives one row at the end of a query. A cancelled query records nothing. See #484.
The data already exists
This issue needs no new counter.
ExecutionPlanMetricsSet updates while the scan runs. The values are live.
AtlasScanMetrics already counts the work of an Atlas scan:
atlas_datasets_scannedcounts the datasets a partition read.atlas_datasets_prunedcounts the datasets the statistics ruled out.atlas_index_rowscounts the datasets a pruning index covers.
The plan holds the total dataset count. create_physical_plan makes one entry per dataset.
So a reader can compute progress today. Example: 42 of 190 datasets, and 12 ruled out.
What is absent
A place to read the values from.
No caller reaches the physical plan after run_query returns. The plan lives inside the stream alone.
Steps
- Add a registry of active queries. Key it on the query id.
- Hold the start time, the user and the physical plan in each entry.
- Insert an entry when a query starts.
- Remove the entry when the stream drops.
- Add a read path for the registry. A SQL table function matches the existing style.
- Add a task that logs the slow queries. Log one line per query above an age limit.
Why a timer, and not the read path
A collection holds up to millions of datasets. An event per dataset floods the log.
Sample the registry on a timer instead. Set the age limit in config. 30 seconds is a reasonable default.
A second use
The registry gives cancellation a home.
Beacon holds no cancellation token today. A client cancels a query only by a disconnect. No caller can cancel a query by its id.
Hang a token on each entry. Issues #483 and #484 both need one.
Design overlap
Issue #484 must decide how the query store marks a partial row.
This issue must decide what the registry reports.
Sequence the two together. One decision covers both.
Files
beacon-db/beacon-core/src/runtime.rs
beacon-db/beacon-core/src/metrics.rs
beacon-db/beacon-file-formats/beacon-arrow-atlas/src/datafusion/metrics.rs
Related
#481, #483, #484
Issue #485 adds the query id to the logs. That id keys this registry too.
- Lingua principale
- Rust
- Stelle
- 16
- Fork
- 4
- Merge medio
- 19h 58m
- PR unite (30g)
- 39
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di maris-development/beacon
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
maris-development/beacon#704 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
maris-development/beacon#681 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort-S python
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
maris-development/beacon#494 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort-S tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
maris-development/beacon#493 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
maris-development/beacon#687 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di maris-development/beacon
Issue simili
-
autofix:working
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
libracoder/kiri#1138 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
roc-lang/basic-webserver#277 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
samkerrcode/opengent#113 ·
I maintainer di solito rispondono entro 1 giorno
-
app bug session
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno