Query logs carry no query id and no info events
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
- 52/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- backend, observability
Direzione di ricerca
Start with beacon-db/beacon-core/src/runtime.rs at the query ID creation point, then trace how the result stream is consumed in beacon-server/beacon-server/src/axum/client/query.rs and how Worker::prefetch spawns dataset opens. Review related issues #481 and #482 for the overlapping spawn change. Done means query start and end logs share the client-visible query ID, include the requested fields, and cover the stream and spawned work without per-batch or per-chunk events.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What is missing
A query produces no log line at the default level. The default level is info.
run_query holds no info! event. The query handler holds none either.
The logs also hold no query id. run_query makes the id at runtime.rs:99. No log event records it.
The client reads the id from the x-beacon-query-id header. No log line matches that id.
Why this matters
The Atlas read path logs real numbers at debug level. Three examples:
atlas create_physical_planreports the collection count and the dataset count.atlas infer_schemareports the field count.AtlasSource morsel scanreports the datasets and the partitions.
No reader can attribute these lines to a query.
Two queries run at the same time. Their lines interleave. Nothing separates them.
Current state
The codebase holds one span. See runtime.rs:93:
#[tracing::instrument(skip(self, query, identity))]
The attribute skips every argument. So the span carries no field. It adds only a function name.
No other span exists. The codebase holds no info_span! call.
Steps
- Make an
info_span!afterrun_querymakes the query id. - Record the id, the user and the query kind on the span.
- Attach the span to the result stream. Use
tracing::Instrument. - Add an
info!event when a query starts. - Add an
info!event when a query ends. Record the duration, the rows and the bytes.
Why step 3 matters
The setup ends before the scan runs. A client pulls batches after run_query returns.
A span on the function alone covers none of the read path.
One risk
Worker::prefetch starts each dataset open with tokio::spawn. A spawned task does not inherit the current span.
Instrument that task with Span::current(). Without this step the open logs stay orphaned.
Issue #482 changes the same spawn. Do both in one change.
Do not
Do not log per chunk. Do not log per batch.
A collection holds up to millions of datasets. Such an event floods the log.
The crate docs already state this rule. A skipped column logs at debug for the same reason.
Files
beacon-db/beacon-core/src/runtime.rs
beacon-server/beacon-server/src/axum/client/query.rs
beacon-db/beacon-file-formats/beacon-nd-array/src/arrow/morsel.rs
Related
#481, #482
Issue #486 covers the progress of an active query. This issue covers the logs of one query.
- 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