With the latest versions of Couchbase and Couchbase SDKs, support for transactions has been provided for both N1QL Statements as well as KV Ops.
What is the current state of support for transactions within the Eventing service on the latest version of couchbase? If not supported, is it on the roadmap? or is it generally advised to make a CURL to an internal API that can facilitate that transaction business logic there.
Hey Alex one thing to be aware of in Eventing transactions “begin work”, “commit work”, and “rollback work” currently can “leak” some unexpected mutations so that you might get extra document(s) that are unexpected on a update/insert or on a delete so you have to be very careful about when you use transactions and eventing together.
Of course we plan to fix this but there is no definitive roadmap or release time for this I’m pushing to get it fixed sooner than later hope this helps.
@jon.strabala
What do you mean by “leak” unexpected mutations?
As in, eventing may pick up the uncommitted transaction state and process the mutation?
Also, are there any solutions for KV and transactions? Looks like the solution provided are for DML Query Statements Only. SDKs have the ability to perform both KV and Query operations within a ctx context.
Hi @jon.strabala , is this topic fixed in any version of Couchbase or is still present in the version 7.2? I see this in the documentation “All Couchbase services only see committed data. Uncommitted transaction modifications (i.e. dirty data) are never visible to any Couchbase service.”
Many thanks in advance
Can you send me the link, I’m pretty sure Eventing still leaks intermittent transaction mutations. Once I read the do I’ll retest and get back to (and get the docs updated if they are incorrect)
I believe it will fix the transaction leak issue in OnUpdate() handler by suppressing the documents with the xattr.txn values. However there still will be an occasional transaction leak in the OnDelete().
This may only work for SQL++ queries and might not support the SDK request, it’s the best I can offer up right now.