Transactions like in relational database


#1

Dear all,

Im interested if there is any possibility to create transactions in couchbase and than commit it.

My scenario is:

  1. Get some data
  2. Lock it
  3. Update first document
  4. Update second document
  5. If both update well then commit it

For me its very important to update several document if one fail i need to rollback second.

Please help me to figure out this issue.

Thank you in advance.


#2

Hello,
Couchbase provides several locking and durability primitives using which you can build transactions in the application layer. You may find the following blog helpful:
https://blog.couchbase.com/acid-properties-couchbase-part-1/

Couchbase is also exploring native support of transactions in a future release. Please reach out to me (shivani.gupta@couchbase.com) directly if you would like to discuss more about your use case.

Thanks!