Deleted CloudKit records Reappear

与世无争的帅哥 提交于 2019-12-03 11:04:41

Apple replied to a bug report that I have filed that this issue should be solved with iOS 9. So far that seems to be right as this issue hasn't occured again, but please let me know if this is still bothering someone.

This might happen because the dashboard trace below suggests Apple use the Tombstone technique for replicating deletes across a distributed database. One of the nodes might have a bug or an old software version and is syncing the tombstone false field back across the system, causing the record to undelete itself. Or maybe something your code is doing is accidentally bringing these deleted records back to life? A workaround would be to use your own soft-delete boolean field and see how that behaves.

[{
    "results": [{
        "tombstone": false
        "id": "NewItem",
        "etag": "ibgs5bpj",
        "recordType": "Items",
        "fields": {
            "name": "Malc",
            "location": {
                "latitude": 38.0,
                "longitude": -122.0
            }
        },
        "conflictLosersEtags": [],
        "created": {
            "timestamp": 1435514295943,
            "user": "_0ac573ae502ca7ca9d763a84b27bc42a",
            "device": "_2"
        },
        "modified": {
            "timestamp": 1435514295943,
            "user": "_0ac573ae502ca7ca9d763a84b27bc42a",
            "device": "_2"
        }
    },
    ...

As for the record counts, yes mine are inaccurate too.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!