I like the new CB release as it means we can update documents in the bucket without needing a shadow bucket.
Thus allowing shared access to buckets via REST and sync Gateway.
Also CB + XDCR use quite a bit less cpu which is good.
However we have an issue with a bucket that does not use Sync Gateway.
The spec is as follows…
Couchbase 5.0.0 or 5.0.1
Bucket with no Sync Gateway.
Create a new document via REST or web GUI and the CB revision is NOT 1. It could be 5 or 473 for example.
We normally use XDCR however this is with XDCR disabled.
Any subsequent updates to documents correctly increment the revision by 1.
I suspect what is happening is that the document is created with rev 1, but then it’s internally updated multiple times for some reason.
The reason I think this is that if XDCR is enabled and a doc is created then the replicated copy on the other CB server has rev 1 whereas the original doc has the bogus rev count.
This weird behaviour totally messes up XDCR as this sequence occurs…
Create a new doc on Server A, rev is 5 for example.
XDCR doc appears on Server B, rev is 1. (Suggesting the rev was 1 originally)
Update or delete doc on Server B rev is 2.
Rev 2 is lower than 5 so doc is never synced and doc on Server A is stale.
Update or delete doc on Server A rev is 6.
XDCR doc appears on Server B, rev is 6. (So rev 2 is lost)
If we manually remove all the documents from the bucket the behaviour stays broken.
If we purge the bucket then add a document the revision ID is 1.
But then after a while this fault returns.
We have been able to purge, then restore all documents and it works OK for a while.
Any one using CB 5 see this behaviour ?
A question in Couchbase is there a way to show revision history (like there is in CBL) either in the Web GUI or programatically.
Note that we have been using CB 4.5 for a long time and this has been working fine. You don’t see the rev count like you do in CB 5. I guess it’s done in a different way, but changes to documents on any server replicated correctly using XDCR.