Reputation: 873
I used Couchbase Enterprise Edition 5.1.0 build 5552 in my application with Couchbase Sync Gateway/1.5.2(2;00bcb59). I saved several documents and I saw many conflicts in Couchbase Server. I'll try to follow the documentation of Couchbase how to resolve conflicts but some are jammed.
I don't understand some things in Couchbase: 1. if there is a conflict going on, the bodymap is present, but once it is resolved it must disappear? 2. if there is a conflict, how do I eliminate the branches that do not interest me? 3. What is the best procedure to resolve these conflicts?
Upvotes: 1
Views: 256
Reputation: 858
For these versions, you can handle the conflicts in mobile side. Otherwise, your database size may grow quickly due this revision tree. (You should also limit this tree size) Actually, due to this issue, Couchbase introduced conflict free mode in newer versions of sync gateway which doesn't allow conflicted revisions to be pushed to database.
I think this link, https://dzone.com/articles/managing-database-sizes-in-couchbase-mobile-and-co will be helpful for your case. For managing conflicts in a better strategy, use master & replica approach, resolve any conflict in server side. Don't allow clients to update master, they should have their own replicas for each master and merging changes to master, as I said, should be done in server side.
Upvotes: 2