missing revalidation?

Aperta
#304 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

Start in cache/cache.go at the linked code around line 126 and trace how fetch() releases and reacquires the lock. Check which cache operations can run during the fetch and whether any can make the pending insert invalid. Done means establishing whether revalidation is needed and, if so, defining the behavior before making a change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hello, it appears a lock is dropped before a potentially long-running operation, and then reacquired before continuing. This is fine. However, it appears that there is no confirmation that the update is still legal after reacquiring the lock.

Are there any operations that could be performed while fetch() is executing that would invalidate the cache in such a way that the insert should be failed instead of continuing?

https://github.com/juju/utils/blob/bf9cc5bdd62dabc40b7f634b39a5e2dc44d44c45/cache/cache.go#L126

Thanks

Lingua principale
Go
Stelle
209
Fork
88
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di juju/utils

Tutte le issue di juju/utils

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.