Implementation flaw
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia in SyncedDatabase alla riga 350 e verifica come vengono gestiti pendingRecordZoneChanges e l’evento stateUpdate. Valuta la finestra di crash descritta nell’issue e la modifica proposta all’API asincrona; il lavoro è completato quando esiste una risoluzione confermata da un maintainer per il problema di perdita di dati o di progettazione dell’API.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi there,
I think there is an implementation error in the sample project - more specifically, a flaw in the design of CKSyncEngine.
In the SyncedDatabase file, line 350:
self.syncEngine.state.add(pendingRecordZoneChanges: pendingSaves)
This tells the syncEngine what to do when the time is right. Since this piece of information is not persisted in this call (I think its persisted in .stateUpdate(let event)), there is a chance that this information is lost if the app crashes between .add(pendingRecordZoneChanges: pendingSaves) and .stateUpdate(let event).
I know this is just a sample project, but I really think this is a flaw in the API design of CKSyncEngine since I do not see an easy way to guarantee correct behavior. A simple fix would be to make .add(pendingRecordZoneChanges: pendingSaves) (and similar methods) async and only complete after .stateUpdate(let event) was called.
What do you think?
- Lingua principale
- Swift
- Stelle
- 270
- Fork
- 15
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 apple/sample-cloudkit-sync-engine
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
apple/sample-cloudkit-sync-engine#17 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
apple/sample-cloudkit-sync-engine#15 · 6 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
apple/sample-cloudkit-sync-engine#13 · 1 commento ·
-
var listID: String Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 42/100
apple/sample-cloudkit-sync-engine#10 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
apple/sample-cloudkit-sync-engine#6 · 3 reazioni ·
Tutte le issue di apple/sample-cloudkit-sync-engine
Issue simili
-
task
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
vsanthanam/JBird#429 ·
-
Bolus validation button text Apertaneeds-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
nightscout/Trio#1574 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
pending-maintainer-response pending-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
make notarise-dmg notarises whichever dist/ image sorts last, not the one make dmg just built Apertaarea:build bug good first issue P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
uttrflow/uttrflow-swift#1412 ·