ROBUSTNESS: Write RDS files atomically
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia dall’implementazione di writeRDS() e individua i due utilizzi rimanenti di saveRDS() menzionati nell’issue. Esamina PR #316 per comprendere l’ambito proposto e verifica che tutte le scritture RDS evitino di esporre file di destinazione incompleti; il completamento si considera raggiunto quando le scritture interessate rispettano il requisito di atomicità dell’issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Issue
When writing an RDS file, it might fail half way through, resulting in an incomplete, corrupt file. Similarly, if one process attempts to read a file that is currently being written by another process, the read might occur on an incomplete file.
Suggestion
Always write RDS file atomically. This can be achieved by writing to *.rds.tmp and then rename the file to *.rds after saveRDS() completes. This way the target *.rds is guaranteed to be complete.
By writing to *.rds.tmp instead of tempfile() guarantees that we write to the same drive, avoiding cross-drive moves and copies.
Patch
See PR #316 for a patch. I updated writeRDS() to write atomically and I've added wait = 300, which can optionally be set to wait = 0. The latter is used to replace two remaining saveRDS() uses.
- Lingua principale
- R
- Stelle
- 184
- Fork
- 54
- Merge medio
- 1g 21h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la 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 mlr-org/batchtools
-
Honest R dependency policyApertacompat docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
mlr-org/batchtools#332 · 5 commenti ·
-
cf-slurm downstream robustness
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
mlr-org/batchtools#331 · 1 commento ·
-
cf-slurm needs-repro question
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mlr-org/batchtools#315 · 1 commento ·
-
compat docs good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
mlr-org/batchtools#304 · 1 commento ·
-
cf-slurm enhancement robustness
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mlr-org/batchtools#303 ·
Tutte le issue di mlr-org/batchtools
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 3 giorni
-
Elevation orderAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
inbo/erl-butterflies-2025#19 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
The-Strategy-Unit/nhp_output_reports#116 · 1 commento ·
-
Clearing results in the order they were sent leaves one registered, breaking `dbDisconnect()`Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno