Couchbase sync updates missing on CBL2.0

Hi,

I am using Couchbase server 5.0, Sync_Gateway 1.5.0 and CBL 2.0 on android platform. I am missing update sometimes when I delete or update any document on couch server. Those document are updating on sync_gateway but not getting updated on mobile devices.

For example, this example has occurred multiple times:

I deleted a document from the bucket. It is removed from my sync_url as well but it is not deleted from mobiles.

I update any document on the server. It is updated on sync_url as well (Its revision id changed). But still, I am not able to get an update on mobile end.

My sync_gateway JSON is:

{
“interface”: “:4984”,
“adminInterface”: “:4985”,
“log”: [“CRUD”, “CRUD+”, “HTTP”, “HTTP+”, “Access”, “Cache”, “Shadow”, “Shadow+”, “Changes”, “Changes+”],
“databases”: {
“profile”: {
“server”: “http://cluster1-ip:8091”,
“bucket”: “profile_detail”,
“username”: “username”,
“password”: “password”,
“enable_shared_bucket_access”: true,
“import_docs”: “continuous”,
“sync”: function(doc) {channel(doc.channels);},
“users”: {
“GUEST”: {
“disabled”: false,
“admin_channels”: ["*"]
}
},
“unsupported”: {
“enable_extended_attributes”: true,
“replicator_2”: true
}
},
“CORS”: {
“Origin”: [“http://localhost:4200”],
“LoginOrigin”: [“http://localhost:4200”],
“Headers”: [“Content-Type”],
“MaxAge”: 17280000
}
}

Am I missing something on configuration? does it require shadow buckets as the previous sync_gateway version 1.4.1? Any other alternate way to achieve shadowing on couchbase? So that I can be able to get proper document updates on the mobile platform.

Regards,
Achint

No. Bucket shadowing is deprecated. With shared bucket access in CBM 1.5 , you should be able to propagate changes from server to mobile clients directly. So we need to identify what is going on here …

  • Can you turn on debug logging on the client side using setLogLevel to ALL and see if there are any sync errors being reported on client side.

How did you exactly do the delete/update ? (SDK, SG API or deleted by running a Query on the server directly)?

Do you mean when you tried to query for deleted document via the SG REST API? What did you get?