ChunkCache drops a dirty chunk if saving it during eviction fails
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cloud, java
- Ambito
- data-engineering
Direzione di ricerca
Start with ChunkCache and the eviction listener wired through Caffeine's .executor(Runnable::run), plus the chunkSaver.save call that catches IOException and NonWritableChannelException. The issue suggests a side map drained by flush() or excluding dirty chunks from eviction, but the design choice is open. Done means a dirty chunk survives a failed save during eviction and is written or reported by force(), which needs fault-injected tests since reproduction is unclear.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I was reading ChunkCache while working on #370 and noticed this:
try {
chunkSaver.save(index, chunk);
} catch (IOException | NonWritableChannelException e) {
exceptionsDuringWrite.add(e);
}
bufferPool.recycle(chunk.data());
By the time this runs the chunk is already out of the cache, so if the save fails there is nothing left to retry. The exception is recorded and surfaces later in force(), but the data is gone, and the write() that produced it had already returned, so from the caller's side it looks written.
The cache holds at most five idle chunks (MAX_CACHED_CLEARTEXT_CHUNKS), so writing a file with more chunks evicts dirty ones as a matter of course. A transient ENOSPC or EIO at the wrong moment is enough.
I have not tried to reproduce it. It needs the save to fail exactly during eviction, so I guess it takes fault injection rather than a real filesystem.
It also does not look like a one-liner: the listener runs inside Caffeine's eviction (.executor(Runnable::run)), so re-inserting from there would just evict again. Keeping failed chunks in a side map drained by flush(), or keeping dirty chunks out of eviction altogether, both seem plausible.
Happy to take this if you think it is worth fixing.
- Lingua principale
- Java
- Stelle
- 110
- Fork
- 39
- Merge medio
- 1g 28m
- 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 cryptomator/cryptofs
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
cryptomator/cryptofs#246 · 6 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
cryptomator/cryptofs#177 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
cryptomator/cryptofs#171 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
cryptomator/cryptofs#153 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
cryptomator/cryptofs#151 ·
Tutte le issue di cryptomator/cryptofs
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
wultra/powerauth-tests#980 ·
-
account bug communication lecture
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
line/centraldogma#1397 ·
I maintainer di solito rispondono entro 2 giorni
-
[Bug]: Fixed/recurring deposit accounts are treated as savings in ownership and listingsForse già presa @Aana123 l’ha presa oggi. Apertabug Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/fineract-consumer-facing#252 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
cryptomator/hub#515 ·