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

Save sync checkpoint in variables service #2028

Closed

Conversation

chrisekelley
Copy link
Member

Added pending to sync progress output

Moved over from #2019

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

Adds separate push/pull targets for sync, which enables different configs. Reduced reduced batch-size and batches_limit, better for mobile devices w/ less memory.

Before the sync, the code checks for sync-push-last_seq and sync-pull-last_seq, which is populated during each sync.

    let pull_last_seq = await this.variableService.get('sync-pull-last_seq')
    let push_last_seq = await this.variableService.get('sync-push-last_seq')

Limitations and Trade-offs

If appConfig.json couchdbSync4All is set, this code ignores the push settings in Sync Configuration; instead, it syncs all forms.

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.
Added sync direction
Separate push/pull pouchdb sync options
Implemented caching for tangerine-build-id and tangerine-build-channel
better for mobile devices w/ less memory.
@chrisekelley
Copy link
Member Author

Closed; moved to next branch: #2031

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