DML Error during update query n1ql


Now a days very often I am getting following error

Error: DML Error, possible causes include CAS mismatch or concurrent modificationFailed to perform update - cause: MCResponse status=KEY_EEXISTS, opcode=SET, opaque=0, msg: Data exists for key

This error occurs even when only one client is updating document.

Can any one help out in finding cause for this error.


To update document we need to read first and update. In mean time some one might be modified or document might locked. You need to retry as suggested here Concurrent Updates - DML Error