Record metrics for a cancelled stream query
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- data-engineering, observability
Direzione di ricerca
Start with beacon-db/beacon-core/src/runtime.rs:237 and the stream wrapper CoalesceSqlStream, then trace how beacon-server/beacon-server/src/axum/client/query.rs stores query metrics. Decide how partial rows will be marked, record collected metrics when a stream is cancelled, and check that completed streams keep their existing behavior. Done means cancelled stream queries leave identifiable partial metrics in the query store and counters.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Parent: #481
Describe the bug
The stream output records query metrics at stream end. A cancelled query never reaches that point.
The query store then holds no row for the query. The atlas_* counters are lost too.
A slow query that a client abandons leaves no trace.
Impact
These queries need diagnosis the most. A user reports a slow query. The query store holds nothing about it.
The two output routes differ here. run_query_to_file records metrics after the write. The code says so at runtime.rs:237.
Expected behavior
A cancelled query records the metrics it collected.
Open decision
The row is partial. A reader must not read it as a complete query.
Pick one option:
- Add a state column. Values: complete, cancelled.
- Add a boolean column for a partial row.
- Mark the row in an existing column.
Option 1 is clearer. It also costs a schema change in the query store.
Suggested fix
- Pick an option above.
- Record the metrics when the stream drops.
- Mark the row with the chosen column.
A Drop implementation on the stream wrapper is one way. CoalesceSqlStream already wraps the stream.
Keep the record step cheap. A drop runs on the runtime.
Files
beacon-db/beacon-core/src/runtime.rs
beacon-server/beacon-server/src/axum/client/query.rs
Scope
Every stream query. The format does not matter.
- 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