Hi.
I’m seeing a lot of “Document update conflict” messages when I do some large scale document changes (e.g. I delete a few hundred docs locally).
They are in my sync_gateway logs:
sg_info.log:2019-02-09T04:47:16.775Z [INF] Changes: MultiChangesFeed(channels: {}, options: {Since:53242 Limit:0 Conflict s:false IncludeDocs:false Wait:true Continuous:true Terminator:0xc4203ef0e0 HeartbeatMs:0 TimeoutMs:0 ActiveOnly:false}) … (to MZyNrBzjOZZl)
sg_info.log:2019-02-09T04:47:16.809Z [INF] SyncMsg: [3810a682] #4097: Type:setCheckpoint –> 409 Document update conflict Time:2.085141ms User:MZyNrBzjOZZl
sg_info.log:2019-02-09T04:47:17.015Z [INF] SyncMsg: [3810a682] #4105: Type:setCheckpoint –> 409 Document update conflict Time:946.986µs User:MZyNrBzjOZZl
sg_info.log:2019-02-09T04:47:17.224Z [INF] SyncMsg: [3810a682] #4106: Type:setCheckpoint –> 409 Document update conflict Time:1.979689ms User:MZyNrBzjOZZl
sg_info.log:2019-02-09T04:47:24.398Z [INF] Changes: MultiChangesFeed(channels: {}, options: {Since:53242 Limit:0 Conflict s:false IncludeDocs:false Wait:true Continuous:true Terminator:0xc421b57080 HeartbeatMs:0 TimeoutMs:0 ActiveOnly:false}) … (to MZyNrBzjOZZl)
I do have ““allow_conflicts”: false,” in my sync_gateway.json file.
This isn’t unique - this topic talked about it.
However, the reason I’ve raised it is:
a) that was quite a long time ago
b) it wasn’t resolved that I could see (although Jens did indicate it was ignorable)
c) he was seeing error messages, whereas I’m seeing exceptions.
In my front end, I create my listener and set a change handler function:
replicator = new Replicator(sync_config);
listenerToken = replicator.AddChangeListener(SyncStatusUpdate);
replicator.Start();
The problem shows up in the SyncStatusUpdate handler…
public void SyncStatusUpdate(object sender, ReplicatorStatusChangedEventArgs e) {
....
if (e.Status.Error != null)
{
log.Debug("Got a sync error! " + e.Status.Error);
In my logs I see:
Got a sync error! Couchbase.Lite.CouchbaseLiteException: CouchbaseLiteException (LiteCoreDomain / 26): Document update conflict.
I’m fine if this is an ignorable error… but it seems rather strange to have an exception object. Also… I’m having to write code of the form:
if (e.Status.Error.Message.Contains("Document update conflict")) {
...ignore the error....
which is fragile to any future changes you make in messages. There is an error code “26” - is that reliably and uniquely associated with ignorable sync errors?
Am I misunderstanding what’s going on here?
Thanks for your help.
Paul.