Allow applications to handle CloudKit zone purges before local deletion
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- sqlite, swift
- Lĩnh vực
- databases, distributed-systems
Hướng nghiên cứu
Start in Sources/SQLiteData/CloudKit/SyncEngine.swift at handleFetchedDatabaseChanges, especially the .deleted and .purged path, and compare it with the .encryptedDataReset handling. Read Tests/SQLiteDataTests/CloudKitTests/FetchedDatabaseChangesTests.swift for the existing deletion and preservation expectations. Done should define and test an application policy or delegate point for private-zone purges while preserving the current default behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Could SyncEngine expose an application policy/delegate hook before deleting local records in response to a CloudKit zone purge?
In ReceiptGenie, the local receipt library is durable user data. If a user removes the app's cloud data to free iCloud storage, we would like to preserve their local library and pause cloud synchronization, then let them explicitly choose whether to resume/re-upload or delete their local data. We do not want to silently recreate the cloud contents against the user's intent either.
This is a source-based behavior/API report, not a claim that SQLiteData caused a confirmed customer incident. We are getting reports from production customers about missing local records and investigating, but do not have the customer's CloudKit event history or a confirmed triggering action.
Current behavior in the source
In SyncEngine.swift at 1.12.0, handleFetchedDatabaseChanges handles .deleted and .purged together by deleting local rows associated with the zone through SyncMetadata. It then schedules recreation of the default zone. .encryptedDataReset instead takes the upload path.
I found the same policy in 1.6.1. Account changes already have an application delegate hook, but I could not find an equivalent interception point for zone purges.
The existing FetchedDatabaseChangesTests document local deletion after zone deletion and preservation after encrypted-data reset. I inspected these tests; I have not run a real iCloud-storage-purge reproduction or the upstream test suite for this report.
Requested behavior / questions
- Is propagating a
.purgedzone event into local row deletion the intended product contract? - Is there a supported way to preserve the local library and pause synchronization on that event today?
- Would you consider a reason-aware delegate/policy hook before local deletion, allowing an app to choose its recovery flow while preserving the existing default for other apps?
The request concerns the app's private database zone. It is not a proposal to ignore ordinary receipt deletion on another device or retain access to revoked shared records. Account switching also needs its own isolation policy so one account's data is never uploaded to another.
Reproduction status / versions
Source inspected: SQLiteData 1.6.1 and 1.12.0. No standalone runtime reproducer yet; customer app version and triggering event remain unknown. This report is deliberately scoped to the identifiable source behavior and the missing application policy hook. Happy for this to be moved to Discussions if that is the preferred venue.
- Ngôn ngữ chính
- Swift
- Star
- 1.9k
- Fork
- 154
- Merge trung bình
- 2 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pointfreeco/sqlite-data
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
pointfreeco/sqlite-data#557 · 2 bình luận ·
-
Child records deleted locally when their parent's save failed with `quotaExceeded`Có thể đã có người làm @jalalawqati đã nhận 22 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
pointfreeco/sqlite-data#547 · 2 bình luận · 1 reaction ·
-
CloudKit data loss after deleting then re-inserting record with the same UUIDCó thể đã có người làm @jsutula đã nhận 209 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
pointfreeco/sqlite-data#418 · 2 bình luận ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
pointfreeco/sqlite-data#356 ·
-
Violation of “last edit wins” conflict resolution strategyCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
pointfreeco/sqlite-data#354 · 2 bình luận ·
Tất cả issue của pointfreeco/sqlite-data
Issue tương tự
-
bug milestone-qa mobile
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
lognorman20/monaco#4011 ·
-
🚀 [firebase_core] Bump Firebase iOS SDK (12.19.0 → 13.0.0)Có thể đã có người làm @SelaseKay đã nhận hôm nay. Đang mởNeeds Attention type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
firebase/flutterfire#18769 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🎉 Add NijiaĐang mởaddition
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
jaywcjlove/awesome-mac#3269 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Native HTTP policy fixture rejects its pathless response URLCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apple/swift-nio-quic#126 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày