Thank you Andy.
I have gone through that document before posting it but the problem i could not find out who caused this conflict.
Application (IOS or Android device) can not update these documents as these are ready only.
I use Sync Gateway API to publish updates to the documents though Admin port to only one couchbase server (Node A) and that couchbase server replicates data with rest of the couchbase nodes (Node B and C).
I have gone through 3 nodes couchbase sync gateway logs and found out that actually update happened on couchbase server Node B and then pushed that update to Couchbase Node A and C and that the puzzle here as sync gateway API never have connection to Couchbase Node B to update documents.
I could not find much information regarding who updated those documents with wrong version number and why couchbase recorded older revision number when previous revision number was 12-* and should increment to 13-* instead it started with 2-*
“rev”: “12-0442696a50ff9f50e6bf03b74f1f2ce9”,
“new_rev”: “2-b5971e331af61e68f1d3f0f7fe0dfd48”,
After this issue happend i have manually updated document through Sync Gateway API through admin port and it recorded version 13-*
See below
{
"_sync": {
“rev”: “13-1d7d0ff95f149c3686a61141ea28d8cb”,
“flags”: 24,
“sequence”: 4439,
“recent_sequences”: [
3,
4,
319,
397,
398,
411,
650,
651,
654,
655,
658,
664,
1478,
1962,
4439
],
“history”: {
“revs”: [
“4-6adbfef01c480c5590c4c173de08a19c”,
“1-0e95bc0511487eecd70f4a9edef038df”,
“10-9ec56e04a4209eb8fb5ae15e7bc9b5a5”,
“13-1d7d0ff95f149c3686a61141ea28d8cb”,
“9-272d05f80de0ae8c99803dec955d2cfd”,
“7-875c9cc247f8d0c118391de232406114”,
“12-0442696a50ff9f50e6bf03b74f1f2ce9”,
“1-db78006f15d25fb7922a0f83e225a097”,
“2-204a9a1aa61dd435355a34158cc19ade”,
“6-06a47434603430cae68986f0ee2babc0”,
“8-37db2090ce85617a29327bac47cb2136”,
“5-e52cd1e3a8511604fd2f99d9bf9006e8”,
“3-d297871cff58fb70b9ea7c90640bc854”,
“2-b5971e331af61e68f1d3f0f7fe0dfd48”,
“11-2dc30599b0313be950f89a8db3d6aa73”
],
Is there any way i can find out where this update initiated and how can i prevent this issue in future as it is still happening in our environment.
Thanks for your help.
Thanks,
Karunakar