Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-42413

Query needs to allow continuing a transaction that does not have mutations

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • None
    • None
    • query
    • 1

    Description

      If I do this:

      transactions.run((ctx) -> {
         ctx.get(collection, "doc1");
         ctx.get(collection, "doc2");
         ctx.query("SELECT ...");
      }); 

      This results in an error coming back from the BEGIN WORK of:

      {"code":17006,"message":"Start Transaction statement error: No bucket named "} 

      My understanding from Sitaram is that this is caused by doing a BEGIN WORK with zero mutations.

      But this is perfectly valid.  There have been some read operations done inside the transaction before the query, and there is a transactionId, attemptId, and a transaction configuration.  So we are not starting a fresh transaction at the ctx.query point, but instead continuing an existing one, and this should be permitted.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kamini.jagtiani Kamini Jagtiani
            graham.pople Graham Pople
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty