-
Notifications
You must be signed in to change notification settings - Fork 29
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
WIP: Fix for sync crash; Simplified pouchDbSyncOptions #2015
WIP: Fix for sync crash; Simplified pouchDbSyncOptions #2015
Conversation
Added pending to sync progress output
} | ||
|
||
if (syncDetails.deviceSyncLocations.length > 0) { | ||
const locationConfig = syncDetails.deviceSyncLocations[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there ever be more than one deviceSyncLocation?
Different options for push and pull sync. Hard coded localPouchOptions since to 0.
Current code features different configs for push and pull sync; the push sync to the remote server did not work when using the same checkpoint sequence id as the pull from remote server. Currently set local push 'since' variable to 0. |
A major issue with the approach of using sync for push and pull is the difficulty in setting fields w/ PII to an empty value when it syncs to the remote server. I wonder if there could be a proxy server on the client side that would intercept the local push sync and remove the fields w/ PII? |
We may need to tighten down the pouchOptions selector because there seem to be some extraneous docs being sync'd:
What local docs should not be sync'd? |
guardrail for sync-protocol-2 deployments. Storing different last_seq for push/pull in sync. Re-instated the option for using $or and a big list of forms.
closed - moved to release/v3.8.2 |
Added pending to sync progress output
Description
This is a work-around for memory issues when syncing with the Cordova-Sqlcipher plugin
Type of Change
Proposed Solution
I simplified the code for creating the selector in the mango query. If a site is using 2-way sync, we are recommending syncing all forms; therefore, I removed the code that builds a very long $or statement.
Before the sync, the code checks for sync-checkpoint, which is populated during the first sync.
Limitations and Trade-offs
This code ignores any settings in Sync Configuration; instead, it syncs all forms. There is no checking of the couchdbSyncSettings.enabled property in each formInfo.
Also, after this sync process is done, the code progresses to this.syncCustomService.sync and does a push of most of the docs that were just synced (marked as customSyncSettings enabled and push). Note it is not a sync, using the changes feed, but instead a push using the doc _id's. Wouldn't it be better to do a couch sync instead? One thing the customSyncSettings can do is remove a field's value if a field is marked as private.