简体   繁体   中英

Prioritization in CouchDB and PouchDB syncing

I'm just wondering about the prioritization of data to sync from CouchDB and PouchDB. Is data with attachments prioritize the last and data without attachments prioritize first?

How does the syncing work? What if the data syncing failed for a particular entry? Is it gonna retry syncing it all over again or is it gonna sync from where it stops?

CouchDB keeps a list of all documents in the order they were inserted and last updated. Replications walks that list back to front in replication, so there is no prioritisation. Syncing works in multiple parallel batches of documents, so the actual order of how documents arrive at the target may vary, but there is no way to control this.

Documents that fail to transfer are retried a number of times before being reported as an error.

The number of concurrent batches and the batch size are configurable in both CouchDB (see http://docs.couchdb.org/en/2.0.0/config/replicator.html)and PouchDB (see “Advanced Options” in https://pouchdb.com/api.html#replication ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM