Can a CouchDB document update handler get an update conflict?

Posted by jhs on Stack Overflow See other posts from Stack Overflow or by jhs
Published on 2010-06-06T05:36:39Z Indexed on 2010/06/06 8:02 UTC
Read the original article Hit count: 408

Filed under:
|

How likely is a revision conflict when using an update handler? Should I concern myself with conflict-handling code when writing a robust update function?

As described in Document Update Handlers, CouchDB 0.10 and later allows on-demand server-side document modification.

Update handlers can process non-JSON formats; but the other major features are these:

  • An HTTP front-end to arbitrarily complex document modification code
  • Similar code needn't be written for all possible clients—a DRY architecture
  • Execution is faster and less likely to hit a revision conflict

I am unclear about the third point. Executing locally, the update handler will run much faster and with lower latency. But in situations with high contention, that does not guarantee a successful update. Or does the update handler guarantee a successful update?

© Stack Overflow or respective owner

Related posts about erlang

Related posts about couchdb