Abort the in-flight dataset open when a worker drops
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- data-engineering, distributed-systems
Direzione di ricerca
Start with beacon-db/beacon-file-formats/beacon-nd-array/src/arrow/morsel.rs, especially Worker::prefetch, Worker::take, and the existing a_worker_waits_for_a_file_another_is_still_opening test. Trace how the opening counter changes when an open task is cancelled, then add coverage that drops a worker during an open and verifies the other workers finish. Done means cancellation stops the open task and the counter does not leave workers waiting indefinitely.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Parent: #481
Describe the bug
Worker::prefetch starts a dataset open with tokio::spawn. The worker keeps the JoinHandle.
The Worker struct has no Drop implementation. Tokio detaches a task when the code drops its handle.
A client cancels a query. Every worker drops. Up to target_partitions open tasks then run to the end.
Each task opens a collection. It reads the footer, the layouts and the attributes. It registers the result into a MorselSource. No worker reads that result.
Impact
The work is bounded. Each worker leaks one open, and then the tasks stop.
The cost is late cancellation and wasted I/O.
Expected behavior
A cancelled query stops every open task.
Suggested fix
- Add a
Dropimplementation toWorker. - Call
abort()onself.nextin it. - Keep the
openingcounter correct.
Step 3 is not optional. Read the code first.
prefetch raises opening before the spawn. The task lowers it at the end. An abort skips that lower step. The counter then stays above zero.
Worker::take reads opening to decide that the scan is over. See morsel.rs:435. A stale counter makes a worker wait for a notify that never arrives.
One partition can drop its stream alone. A LIMIT does this. So the hang reaches a query that the client still reads.
Move the counter decrement out of the task body. Use a guard type that lowers the counter on drop.
File
beacon-db/beacon-file-formats/beacon-nd-array/src/arrow/morsel.rs
Scope
Every nd format reads through MorselSource. netCDF, HDF5, Zarr and Atlas share this path.
Test
The test a_worker_waits_for_a_file_another_is_still_opening covers the wait path. Add a test that drops a worker during an open. Assert that the other workers finish.
- 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