host: ip:127.0.0.1 port:17000
buckets: Bucket1 Bucket2 Bucket3
I want to set 3 buckets {set(Bucket1), set(Bucket2), set(Bucket3)} as a transaction.
How should I do to implement?
The short answer is 'no'. Couchbase does not support transactions across different documents. As theMayer mentioned, you might avoid the need for transactions by modelling your data differently. However, if you must have it, you can use two phase commit to get part of the transaction functionality (the atomicity and durability, but not isolation or consistency.)
You can read up on 2PC in general here: http://en.wikipedia.org/wiki/Two-phase_commit_protocol and specifically as it relates to Couchbase here: http://docs.couchbase.com/couchbase-devguide-2.5/#performing-two-phase-commits
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With