-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YapDatabaseCloudKit with a large amount of data. #212
Comments
Why close the issue?
in YapDatabaseCloudKit.h to divide a changeSet to multiple modifyRecordsOperation. |
I think that we have several ways to fix this issue:
1st way is simple and doesn't require changes in YapDatabase framework. I have already rewrote my logic. I'm saving not more than 350 changes in one transaction and all is working fine. 3rd way is very dangerous because of CKReference. According to Apple's documentation:
YapDatabase knows nothing about stored data. Your objects can be sent in different operations what will cause an error. 2nd way is a great way. Developers will have a more control. But developer should be aware of situation described above. What do you think, @robbiehanson? |
1st way is the method I used right now. But there is a situation it can not cover.
is called and it will check if database
to enumerate
they will transform to ONE YDBCKChangeSet in a In my case, the YDBCKChangeSet has 7000+ |
Adding a flush method to YapDatabaseCloudKitTransaction is a pretty good idea. Even if it doesn't solve every scenario, I can still see it being a useful option in some scenarios.
Excellent point ! From my current understanding, it seems that we have 2 possibilities: A. Modify YapDatabaseCloudKit in such a way as to eliminate the populateTables / repopulateTables code. In order to accomplish this, it would have to be replaced using a more manual technique. I don't know what such an API would look like at this point. But I would imagine it would end up causing a lot more work on the side of the developer (you). And would also suffer from being significantly different from other extensions (in this does-not-auto-update manner). B. Fix the internals of YapDatabaseCloudKit to automatically split a ChangeSet into a maximum of 400 items. And do so in a safe way that allows us to take into consideration CKReferences. I believe the best option is B. I just need a bit of time to think up exactly how I want to implement the "dependency graph & storage". |
I want to sync all my contacts (~900 contacts) from address book to cloudkit. I have a separate connection for synchronization between address book and my database where enumeration of contacts is performed. All saved contacts will be passed in
YapDatabaseCloudKitRecordBlock
whenreadWriteTransaction
will be finished.YapDatabaseCloudKit
sends all saved contacts to CloudKit. But operation fails with "Invalid Arguments" (12/1020); "Your request contains more than the maximum number of items in a single request (400)" error.How i can limit a number of items in single request?
I didn't found setting for that.
The text was updated successfully, but these errors were encountered: