Lets say I have a Client App with Couchbase Lite whose documents are synced to Couchbase Server using Sync Gateway.
For a particular client created document, lets say Client with Couchbase Lite as well as Couchbase Server both has latest rev as 4-663
Now if Client side app is restarted and it recreates the document with rev as 1-112 (Client would have not got 4-663 by that time but at server still the document rev is 4-663),
Will Couchbase server select 4-663 as the winning revision always & will show 1-112 in history bodymap?
What should be the recommended way to solve such kind of issue?
This is a conflict. 4-663 will win because it has a higher generation number (and is not deleted.)
The documentation describes how to detect and resolve conflicts; have you read that section?
Thanks for your response. I shall go through the conflict documentation.
I have faced the same and now I am telling you very simple thing to update.
- made get request to doc and coppied it. Like get localhost:4984/mydoc.
- Copy the response.
- `Make put request like put localhost:4984/mydoc, in the body, past the response which you have copied before. Except id and rev_id, you can change anything you wish.
Let me know if anything required further.