You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using YapDatabaseCloudKit, the extension will accumulate changes for upload. A change set can be arbitrarily large and will result in a single CKModifyRecordsOperation.
In some cases, for example during a database maintenance or migration operation, a significant number of objects could be modified. Resulting in a CKModifyRecordsOperation with a lot of records.
I'm seeing these operations fail with CKError.LimitExceeded, resulting in a suspended extension, and I'm currently looking for the best way to recover from this.
Without a way to break the pending change set up into smaller batches for upload, the extension will just encounter the same CKError.LimitExceeded when resumed, and sync will permanently cease to function for that particular installation.
One possible solution could be the introduction of a configurable operation batch size on the CloudKit extension. The application, or the extension itself, could reduce this when a LimitExceeded is encountered. Such a batch size would likely have to be dynamic, as the acceptable CloudKit operation size is not specified. An approach similar to the TCP protocol's exponential backoff could be used to home in on an acceptable operation size.
Is there some way to recover from this situation with the current version of YDBCK?
The text was updated successfully, but these errors were encountered:
Thanks, @SofteqDG! Excellent point about preserving CKReference integrity when splitting batches. My data model is very simple, just a pool of separate objects with no references, so your open PR was just what I needed. 👍
When using
YapDatabaseCloudKit
, the extension will accumulate changes for upload. A change set can be arbitrarily large and will result in a singleCKModifyRecordsOperation
.In some cases, for example during a database maintenance or migration operation, a significant number of objects could be modified. Resulting in a
CKModifyRecordsOperation
with a lot of records.I'm seeing these operations fail with
CKError.LimitExceeded
, resulting in a suspended extension, and I'm currently looking for the best way to recover from this.Without a way to break the pending change set up into smaller batches for upload, the extension will just encounter the same
CKError.LimitExceeded
when resumed, and sync will permanently cease to function for that particular installation.One possible solution could be the introduction of a configurable operation batch size on the CloudKit extension. The application, or the extension itself, could reduce this when a
LimitExceeded
is encountered. Such a batch size would likely have to be dynamic, as the acceptable CloudKit operation size is not specified. An approach similar to the TCP protocol's exponential backoff could be used to home in on an acceptable operation size.Is there some way to recover from this situation with the current version of YDBCK?
The text was updated successfully, but these errors were encountered: