I have two devices (A & B), both using the Couchbase username.
If I delete a document on Device A via Document.delete() Method, the deletion does not get synced to device B, even if the deletion was properly synced to Couchbase Server.
Only if I use the alternative way, the deletion gets synced :
var doc = database.GetDocument(myDocId);
doc.Update((UnsavedRevision newRevision) =>
{
newRevision.IsDeletion = true;
return true;
});
The alternative way is only necessary when I need to preserve fields, according to Documentation.
Update:
SyncGateway produces the following output when invoking sync on Device B
2016-03-29T14:33:43.320+02:00 HTTP: #508: GET /hamster/
2016-03-29T14:33:43.320+02:00 HTTP: #508: --> 401 Login required (0.5 ms)
2016-03-29T14:33:43.327+02:00 HTTP: #509: GET /hamster/
2016-03-29T14:33:43.327+02:00 HTTP: #509: --> 401 Login required (0.4 ms)
2016-03-29T14:33:43.400+02:00 HTTP: #510: PUT /hamster/_local/424bf94e12e3842ef2be5b89044a7fb55b1c5fbf (as USER)
2016-03-29T14:33:43.402+02:00 HTTP: #510: --> 409 Document update conflict (2.6 ms)
2016-03-29T14:33:43.408+02:00 HTTP: #511: GET /hamster/_local/218bc19b567937692dd28753841527951b8f54e0 (as USER)
2016-03-29T14:33:43.496+02:00 HTTP: #512: POST /hamster/_changes (as USER)
2016-03-29T14:33:43.499+02:00 Changes+: Int sequence multi changes feed…
2016-03-29T14:33:43.499+02:00 Changes: MultiChangesFeed({USER}, {Since:78 Limit:0 Conflicts:true IncludeDocs:false Wait:false Continuous:false Terminator:0xc820b2fc80 HeartbeatMs:300000 TimeoutMs:300000 ActiveOnly:false}) … (to USER)
2016-03-29T14:33:43.500+02:00 Changes+: MultiChangesFeed: channels expand to channels.TimedSet{“USER”:channels.VbSequence{VbNo:(*uint16)(nil), Sequence:0x2}} … (to USER)
2016-03-29T14:33:43.500+02:00 Changes+: Sending seq:79 from channel USER
2016-03-29T14:33:43.500+02:00 Changes+: MultiChangesFeed sending &{Seq:79 ID:-JbyqMJi5CUK1MDX1NrLq-A Deleted:true Removed:{USER} Doc:map[] Changes:[map[rev:13-9ca068d75811871db795fbbde650dcf6] map[rev:11-0324b2fdbb5efa9e44c1dfe87eedf837]] Err: allRemoved:true branched:true} (to USER)
2016-03-29T14:33:43.501+02:00 Changes: MultiChangesFeed done (to USER)
2016-03-29T14:33:43.604+02:00 HTTP: #513: PUT /hamster/_local/218bc19b567937692dd28753841527951b8f54e0 (as USER)