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

Single Query transaction not using metadatacollection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.3.0
    • None
    • None
    • None
    • 1
    • SDK16: SDK 3.3 + Spring Txns

    Description

      We are configuring metadata collection as part of the transaction config in the cluster enviroment

      TransactionKeyspace keyspace =TransactionKeyspace.create("default","custom_scope","metadataCollection");   
       
       ClusterEnvironment env = ClusterEnvironment.builder()          
        // Adding metadata collection for transactions            .transactionsConfig(TransactionsConfig.builder().metadataCollection(keyspace))
      .build();    
       
      Cluster newcluster = Cluster.connect("localhost",ClusterOptions.clusterOptions("query_insert_user","password").environment(env));  

      However we are seeing that the transaction is failing trying access to default._default._default. This makes me think that the ATR is being written to default collection and metadata collection is being ignored.

       

      Error message:

      Caught CouchbaseException: com.couchbase.client.core.error.AuthenticationFailureException: Could not authenticate query {"completed":true,"coreId":"0x59e4ee9f00000002","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:60035","lastDispatchedTo":"localhost:8093","requestId":6,"requestType":"QueryRequest","retried":0,"service":{"operationId":"query","statement":"INSERT INTO `default`.`custom_scope`.`collection_transactionOps` VALUES ('1202e51e-c969-4f2c-8a05-3a834663e8c4', {\"content\":\"initial-query\"})","type":"query"},"timeoutMs":25938,"timings":{"dispatchMicros":7414,"totalDispatchMicros":7414,"totalMicros":45165}}
      

      We can usually print the transaction logs from the logger of ctx/reactive ctx. Please let me know how we can print granular logs for single query transactions. We can discuss more on slack if further logs are needed.

      Attachments

        For Gerrit Dashboard: JCBC-1946
        # Subject Branch Project Status CR V

        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