Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1945

SingleQuery behaving differently when no options are given compared to when default options are given

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Major
    • None
    • None
    • transactions
    • None
    • 1

    Description

      Hi Graham, 

      While trying to debug JCBC-1944, I have hit below issue. 

       

      cluster.query(queryStmt) is behaving differently than
      cluster.query(queryStmt,QueryOptions.queryOptions().asTransaction()) 

      When we execute `cluster.query(queryStmt)` i.e without  any options, we expect that default values are taken which in this case should be QueryOptions.queryOptions().asTransaction().However single query transactions are  behaving differently.

       

       

      So JCBC-1944 is found when we run cluster.query(queryStmt) i.e transaction is being successful without throwing any errors

      When we run same transaction but with 

       ** cluster.query(queryStmt,QueryOptions.queryOptions().asTransaction()) **

      we are getting the  the below error message.

      Caught CouchbaseException:com.couchbase.client.core.error.AuthenticationFailureException: Could not authenticate query {"completed":true,"coreId":"0xb980548600000002","errors":[{"code":13014,"message":"User does not have credentials to run data upsert queries. Add role data_reader_writer on default:default._default._default to allow the query to run.","retry":false}],"httpStatus":200,"idempotent":false,"lastDispatchedFrom":"127.0.0.1:62419","lastDispatchedTo":"localhost:8093","requestId":6,"requestType":"QueryRequest","retried":0,"service":{"operationId":"query","statement":"INSERT INTO `default`.`custom_scope`.`collection_transactionOps` VALUES ('bff760a0-cb98-43ec-84e4-3caae92fb296', {\"content\":\"initial-query\"})","type":"query"},"timeoutMs":25948,"timings":{"dispatchMicros":6180,"totalDispatchMicros":6180,"totalMicros":41107}}

       

       

       

       

      Attachments

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

        Activity

          People

            graham.pople Graham Pople
            praneeth.bokka Praneeth Bokka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty