CKFetchRecordZoneChangesOperation forces me to do a full playback to get a fresh server change token

Originator:jaanus
Number:rdar://FB9073964 Date Originated:2021-04-09
Status:Open Resolved:
Product:CloudKit Product Version:
Classification:Suggestion Reproducible:Always
 
How to reproduce:

Have a CloudKit app with lots of historic data over a longer period of time in a given record zone. Install a fresh copy of your app in a device. Try to fetch some changes with CKFetchRecordZoneChangesOperation as new data arrives.

Observed behavior:

To get a fresh server change token, CKFetchRecordZoneChangesOperation first needs to do a full history playback. This is unacceptably slow over a longer period of time, often yielding a delay of several minutes spent entirely on iCloud server side before any results are returned.

Expected behavior:

Several improvements. Doing CKFetchRecordZoneChangesOperation for a long period of time should work faster.

More importantly, upon doing a fresh install, you often are not interested in the history (if you are, you can fetch specific pieces of history with CKQueryOperation). You would like to use CKFetchRecordZoneChangesOperation to receive any changes going forward. To do this, you need a fresh server change token. There should be a way to obtain the fresh token without having to do a full history playback.

Possibly other changes could help here too, but in my practical experience, the combination of these two (the full playback being slow, and not being able to obtain a current token) is especially unfortunate.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!