Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.1.1
-
CouchbaseNetClient 3.4.10
Couchbase.Transactions 1.1.1
Couchbase Server Enterprise Edition 7.2.0 build 5325
Windows
-
1
-
SDK38
Description
Summary: I'm trying to implement a unique list (aka 'set') within a transaction (there's more to it than just that, otherwise I'd just use a lock, but this is minimum viable reproduction of a bug).
Repro:
- Install/setup Couchbase Server locally
- Create transactionTest bucket
- Run attached console program
Expected: No exception thrown.
Actual:
Couchbase.Transactions.Error.TransactionFailedException: 'Transaction failed.'
Inner exception
InvalidOperationException: Cannot perform operations after a transaction has been committed or rolled back.
Notes:
If I remove the if/rollback:
if (myList.Contains("foo"))
{
await context.RollbackAsync();
return;
}
then the code executes without exception, but then I'm left with ,["foo", "foo"] when I actually just wanted ["foo"].
More notes: I attached log output.
Attachments
Gerrit Reviews
For Gerrit Dashboard: TXNN-134 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
197396,2 | TXNN-134: TEST Rollback on an empty transaction should not result in an exception. | master | transactions-fit-performer | Status: NEW | 0 | +1 |
197399,2 | TXNN-134: Rolling back an empty transaction should not result in a commit failure. | master | couchbase-net-client | Status: MERGED | +2 | +1 |