I have the same document with different revs in local and remote and they are not syncing

117 views
Skip to first unread message

Suresh V

unread,
Aug 24, 2020, 3:40:27 PM8/24/20
to PouchDB

How do I fix this so that the revs become the same and syncing continues?

Do the revs have to be the same for syncing to continue?

Or do the local and remote maintain their own revs?

I did some investigation and found out that the revs are identical.

Can I update the remote directly with the local data when syncing is ongoing?

Can I fix in just 1 place (local or remote) and let the replication take care of the other?

Local is pouchdb and Remote is couchdb.

Should I stop the sync, delete the older docs, do a bulk_doc with new_edits false and restart the sync?

bill.step...@gmail.com

unread,
Aug 31, 2020, 3:37:24 PM8/31/20
to PouchDB
>> I have the same document with different revs
>> I did some investigation and found out that the revs are identical.

I don't really get that entirely but I know you can configure the PouchDB to "Live Sync" with your CouchDB and that it will sync both directions when you do.

I think the simple solution is make a copy of the document and then delete the document on one of the databases and see what happens. If Pouch deletes the doc on the other db after syncing make a new document from the backup and save it on one or the other db and let PouchDB sync them up again.

https://pouchdb.com/api.html#sync

Garren Smith

unread,
Sep 1, 2020, 1:22:54 AM9/1/20
to pou...@googlegroups.com
If the revs are the same then the documents should be the same. If they are not the same then something went wrong when creating the docs. You can try and update one of the docs and then do a sync. That should resolve the issue.


From: pou...@googlegroups.com <pou...@googlegroups.com> on behalf of bill.step...@gmail.com <bill.step...@gmail.com>
Sent: Monday, August 31, 2020 9:37:24 PM
To: PouchDB <pou...@googlegroups.com>
Subject: Re: I have the same document with different revs in local and remote and they are not syncing
 
--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/fa2bd89f-c0a3-4c7d-a55a-1527e6cd8437n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages