Uploaded image for project: 'Distributed Transactions .NET'
  1. Distributed Transactions .NET
  2. TXNN-134

Cannot perform operations after a transaction has been committed or rolled back

    XMLWordPrintable

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:

      1. Install/setup Couchbase Server locally
      2. Create transactionTest bucket
      3. 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

        1. console-example.log
          158 kB
        2. console-example-internal.log
          0.6 kB
        3. Program.cs
          2 kB
        For Gerrit Dashboard: TXNN-134
        # Subject Branch Project Status CR V

        Activity

          People

            richard.ponton Richard Ponton
            matthew.groves Matthew Groves
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change

                PagerDuty