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

WIP: Fix for sync crash; Simplified pouchDbSyncOptions #2019

Closed

Conversation

chrisekelley
Copy link
Member

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

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

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.

 this.variableService.get('sync-checkpoint')

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.

Added pending to sync progress output
Different options for push and pull sync.
Hard coded localPouchOptions since to 0.
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.
@chrisekelley
Copy link
Member Author

Moved from 3.8.1 PR - #2015 - there are more relevant comments in that 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

Successfully merging this pull request may close these issues.

1 participant