connect-couchdb icon indicating copy to clipboard operation
connect-couchdb copied to clipboard

add an option to deal with couchdb conflicts

Open tdebarochez opened this issue 10 years ago • 3 comments

In the case where two concurrent commits are made on the same session, a conflict might occurs. I see three ways to deals with it :

  • throw an exception (actual scenario, but it should be better handled)
  • ignore it
  • erase the actual stored session

tdebarochez avatar Jul 11 '14 15:07 tdebarochez

Any interest in this issue getting addressed? I can see how different users would want to either ignore or throw, based on how important their session data is. Consider a PR?

eddiesholl avatar Sep 28 '16 08:09 eddiesholl

I gladly accept every well tested PRs. :)

tdebarochez avatar Sep 28 '16 08:09 tdebarochez

I've added basic support for ignoring conflicts at https://github.com/eddiesholl/connect-couchdb/tree/conflicts, I'm getting a few other test breakages that I don't think are caused by my changes. If you have a moment do you mind trying it out?

Do you think support for passing in a conflict handling function is required here as well?

eddiesholl avatar Sep 30 '16 12:09 eddiesholl