You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling Client.EndTransaction(ctx, kgo.TryAbort) doesn't abort transaction on the broker and records from it can be consumed with read_committed isolation level after next committed transaction:
Well, you owe me an hour back, but I suppose I owe you that time back as well because my own example is wrong. The code block above is failing because doCommit && e.Err() == nil short circuits when doCommit is false, meaning e.Err() == nil is never evaluated, meaning the AbortingFirstErrPromise never actually waits for records to be produced, meaning the transaction is actually ended before a single record is produced. The abort records actually are produced in a new transaction -- the one that actually will commit.
I spent far too long trying to figure out why this worked when I moved e.Err() out and made the code:
Calling
Client.EndTransaction(ctx, kgo.TryAbort)
doesn't abort transaction on the broker and records from it can be consumed withread_committed
isolation level after next committed transaction:Messages with
abort
in value shouldn't be consumed and there is no control record between aborted and committed records.To reproduce I used slightly modified eos script:
The text was updated successfully, but these errors were encountered: