Skip to content
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

Multiple OCKOutcomes are not sent to MongoDB sequentially #12

Open
shawnpatelbt opened this issue Jun 21, 2020 · 2 comments
Open

Multiple OCKOutcomes are not sent to MongoDB sequentially #12

shawnpatelbt opened this issue Jun 21, 2020 · 2 comments

Comments

@shawnpatelbt
Copy link
Contributor

Hi HyperProtect SDK Team,

I'm using a OCKOutcome to store my data to send to the Mongo backend, however, I've been facing a payload too large error. My solution around the problem was to wrap my data in multiple outcomes (it ended up being 8 outcomes with a 50,000 character string each) and to send those. Since CareKit uses a revision record to send the data to Mongo, when I tried adding all my outcomes to an array, I faced the same error. My solution around this was to create my own sequential system for all 8 outcomes. This works without the presence of an error. But when an error occurs in the upload (no internet), the outcome is still saved to CoreData. In this case, all future uploads will fail to work as the revision payload will always be too large (as the CoreData store contains the outcomes that failed to sync with MongoDB). Is there another way around this or is this something the team is working to fix (ideally a fix to the payload limit as I believe this is way lower than Mongo's limit of a 16mb document)?

Thanks,
Shawn

@e-desouza
Copy link
Collaborator

Hello Shawn, can you create a PR with this scenario as a XCTest case please?

@shawnpatelbt
Copy link
Contributor Author

Yes, I added the XCTests to my open PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants