核心数据,CloudKit-未能找到ckrecordid的匹配objectids
我正在使用CloudKit跨设备同步我的应用程序。
起初,一切似乎都按预期工作,但是一段时间以来,CloudKit似乎被无尽的循环陷入困境,调试控制台抛出了很多这些信息(几千个序列):
Coredata:调试:Coredata+CloudKit: - [PfCloudKitserializer ApplyUpDatedRecords:DELETEDEDRECORDIDS:TOSTORE:INMANAGEDOBJECTCONTEXT:ONELLUPDATINGATTRIBUTES:ANDRESATIONSHIPS:MADECHANGES:错误:] _ block_invoke(1018): 无法找到< ckrecordid的匹配objectids:0x60000330c000; RecordName = 1E0972A7-D9DD-44A7-88F9-3AD13B32A330, diessId = com.apple.coredata.cloudkit.zone: defaultowner > / < ckrecordid:0x60000330c020; RecordName = EE02B981-E54D-486B-95A1-AC0839671C27, diessId = com.apple.coredata.cloudkit.zone: defaultowner >在等待中 关系:0xE92E2F9C5A6D27E2 X-CoreData:// 75AFDFFD-8E35-4B9F-AA61-C47777073B435B/NSCKIMPORTPENDENTRATIONS/p8626
我想最重要的部分是
无法找到< ckrecordid的匹配objectids:0x60000330c000; ...
这只是没有任何特殊自定义代码的标准CloudKit实现,因此我不知道该从哪里开始调查。
这是正常的,预期的行为吗? 我觉得这很放慢了我的CloudKit同步。
I am using CloudKit to sync my app across devices.
At first everything seems to work as expected but after a while CloudKit seems to get caught in an endless loop and the debug console throws tons of these messages (several thousand in serial):
CoreData: debug: CoreData+CloudKit: -[PFCloudKitSerializer
applyUpdatedRecords:deletedRecordIDs:toStore:inManagedObjectContext:onlyUpdatingAttributes:andRelationships:madeChanges:error:]_block_invoke(1018):
Failed to find matching objectIDs for <CKRecordID: 0x60000330c000;
recordName=1E0972A7-D9DD-44A7-88F9-3AD13B32A330,
zoneID=com.apple.coredata.cloudkit.zone:defaultOwner> /
<CKRecordID: 0x60000330c020;
recordName=EE02B981-E54D-486B-95A1-AC0839671C27,
zoneID=com.apple.coredata.cloudkit.zone:defaultOwner> in pending
relationship: 0xe92e2f9c5a6d27e2
x-coredata://75AFDFFD-8E35-4B9F-AA61-C477073B435B/NSCKImportPendingRelationship/p8626
I guess the most important part is
Failed to find matching objectIDs for <CKRecordID: 0x60000330c000; ...
It's just the standard CloudKit implementation without any special custom code, therefore I have no idea where to start to investigate.
Is this normal, expected behaviour?
I feel like this is slowing down my CloudKit sync quite a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚在我这边发现了这个问题。在进一步的调查中,我意识到这些消息与涉及一个特定实体的其他消息在一起。我从JSON文件中预加载核心数据,其中一些数据最终会随着时间而变化。
为了开发目的,每次应用程序启动时,我都会更新JSON文件的预加载数据
事实证明,我在此更新期间创建了新对象以进行比较,而忘记了以后删除不必要的对象。
由于该更新过程创建了数百个对象,因此加起来很快。他们现在没有任何目的在核心数据中漂浮。 Cloudkit必须同步。
但是,最后,数据仍然很小,为什么这会导致那些神秘的调试消息和同步数小时,这对我来说仍然是一个谜。
I just found the issue on my side. During further investigation I realized that these messages came together with other messages referring to one specific entity. I preload Core Data from a json file with some data which eventually change from time.
For development purposes each time the app launches,I update my preloaded data from the json file
It turned out that I created new objects during that update to run a comparison and forgot to delete the unnecessary objects right after.
Since that update process creates several hundred objects, that adds up quite fast. They were now floating around in core data without any purpose. And CloudKit had to sync them.
However, at the end it's still quite small data and why this causes into those cryptic debug messages and hours of syncing, is still a mystery for me.