Follow temporary file + rename pattern for all files

Aperta
#280 3 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
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
c
Ambito
embedded-iot

Direzione di ricerca

Inizia esaminando la gestione speciale dei file temporanei e dei rinominamenti descritta in questa issue e nella discussione dell’issue #131. Identifica ogni percorso di aggiornamento dei file interessato, quindi verifica che tutti gli aggiornamenti seguano il modello dei file temporanei senza esporre file scritti parzialmente o sovrascritti.

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

Descrizione

enhancement

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the CF README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
Currently, there is a special case to handle situations where the MD PDU arrives out of order. A temporary file is opened, and then renamed once the MD packet does arrive.

However, because this is only done for off-nominal cases, it is likely not as well tested as other paths (see bug #131).

Describe the solution you'd like
This pattern of using a temp file should be standard operating procedure, not just something for special cases. Reasons/advantages for always doing it this way described in my comment here: https://github.com/nasa/CF/issues/131#issuecomment-1183239857

This improves atomicity of file updates, prevents clobbering files and avoids cases where other apps might see partial files or other bad content.

Describe alternatives you've considered
N/A

Additional context
As the fix for #131 strictly only fixed the issue described, this is a more general enhancement that would improve CF.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

Lingua principale
C
Stelle
122
Fork
79
Merge medio
1g 15h
PR unite (30g)
4

Preparare l'ambiente

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 nasa/CF

Tutte le issue di nasa/CF

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.