Implementation flaw
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
SyncedDatabase の 350 行目から始め、pendingRecordZoneChanges と stateUpdate イベントがどのように処理されているかを確認してください。issue で説明されているクラッシュの発生し得る期間と、提案されている非同期 API の変更を評価してください。データ損失または API 設計に関する懸念に対する、maintainer が確認した解決策が得られた時点で完了とします。
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- Swift
- スター
- 270
- フォーク
- 15
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apple/sample-cloudkit-sync-engine のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
apple/sample-cloudkit-sync-engine#17 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
apple/sample-cloudkit-sync-engine#15 · コメント 6 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
apple/sample-cloudkit-sync-engine#13 · コメント 1 件 ·
-
var listID: Stringオープン
難易度 1/5 1時間未満 初心者へのやさしさ 42/100
apple/sample-cloudkit-sync-engine#10 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
apple/sample-cloudkit-sync-engine#6 · リアクション 3 件 ·
apple/sample-cloudkit-sync-engine の issue をすべて見る
似ている issue
-
難易度 2/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
521xueweihan/HelloGitHub#3870 ·
-
🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
margelo/react-native-vision-camera#4211 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
TokenIterator.prepare drops LMOutput.State in the .logits branch, breaking generation for every VLMオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ml-explore/mlx-swift-lm#681 ·
メンテナーはふだん 2 日以内に返信