XDCR conflict resolution

Hi,

Refering to question (2) in this thread: http://www.couchbase.com/forums/thread/xdcr,
are there any plans for manual conflict resolution, or the possibility to get somehow notified of a (resolved) conflict?

In our use case, we probably need some control over conflict resolution, or at least get a notification so we can check whether the result is ok....

Regards

Peter

1 Answer

« Back to question.

Hi Peter,

We do have conflict management (where we provide the two documents that conflicted and let the app decide) on our roadmap. The earliest we may be able to release this is the next major release.

That said, I'd love to hear what you would like. Can you provide an example of what you'd ideally like to have?

Ideally, we would like to supply a conflict resolution function ourselves. Essentially, this should be a function that takes two parameters (the documents to merge) and return the merged document, but i can quickly see use cases were we need more info, e.g. which record is coming from which server or similar meta data. For example, image that a record contains address information as well as salary data and that for address data, server1 is leading and for salary data the other server is leading (hypothetical example, but you catch my drift).

Other scenario's i can think of is merging only updated data: suppose we have a record A that has only a changed surname and record B has only an address change. To merge only the changes (i.e. the merged record has the surname from A, but the address from B) we would have to know what "fields" are changed;
in other words: we would have to have access to the previous version of the records too. I don't know whether this is possible though, i guess you are currently not sending over / keeping the previous record, are you?

A third scenario is that our conflict resolution function cannot decide and some manual intervention is needed. In that case, i can image that the conflict resolution does return a "provisional" merge and writes an event or audit record, that can be picked up later by some process that lets the user review or correct the merges done. To realize such a scenario, it must be possible for the conflict resolution function to write data (event/audit record) to the database.

Regards,

Peter