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

Cannot execute more than one n1ql statement via N1QL Transaction

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      Hi Graham, 

      TXNJ: 1.1.4

      CB Server: 7.0.0 build 4122 
      Java SDK: 3.1.0

       

      I can execute the below two N1QL stmts together from Query Workbench

      INSERT INTO `default`.`_default`.`_default` VALUES ('1d33f468-de0a-4222-bf83-3a252383493b', {"content":"initial"});UPDATE `default`.`_default`.`_default` SET content = "updated" WHERE META().id = 'f6f06196-0357-4814-8e2f-35a1e45032a2'

       

      However When I try to execute them together from Txn context, I am getting the below parsing error.

       

       

      [7857.03 ERROR] PerformerTransactionService_Performer Operation failed during transactionCreate due to :  java.lang.IllegalStateException: Command Query INSERT INTO `default`.`_default`.`_default` VALUES ('1d33f468-de0a-4222-bf83-3a252383493b', {"content":"initial"});UPDATE `default`.`_default`.`_default` SET content = "updated" WHERE META().id = 'f6f06196-0357-4814-8e2f-35a1e45032a2' raised error 'com.couchbase.client.core.error.ParsingFailureException: Parsing of the input failed {"completed":true,"coreId":"0xd9b2c6f60000001f","errors":[

      {"code":3000,"message":"syntax error - at UPDATE"}

      ],"idempotent":false,"lastDispatchedFrom":"192.168.100.39:52128","lastDispatchedTo":"172.23.111.133:8093","requestId":153471,"requestType":"TargetedQueryRequest","retried":0,"service":{"operationId":"51671688-63a2-4625-81d0-ce187c4dda7b","statement":"<ud>INSERT INTO `default`.`_default`.`_default` VALUES ('1d33f468-de0a-4222-bf83-3a252383493b',

      {\"content\":\"initial\"}

      );UPDATE `default`.`_default`.`_default` SET content = \"updated\" WHERE META().id = 'f6f06196-0357-4814-8e2f-35a1e45032a2'</ud>","type":"query"},"timeoutMs":130977,"timings":{"dispatchMicros":23563,"totalMicros":47192}}', but require TransactionOperationFailed [7857.03 ERROR] PerformerTransactionService_Performer Operation failed during transactionCreate due to :  java.lang.IllegalStateException: Command Query INSERT INTO `default`.`_default`.`_default` VALUES ('1d33f468-de0a-4222-bf83-3a252383493b', {"content":"initial"});UPDATE `default`.`_default`.`_default` SET content = "updated" WHERE META().id = 'f6f06196-0357-4814-8e2f-35a1e45032a2' raised error 'com.couchbase.client.core.error.ParsingFailureException: Parsing of the input failed {"completed":true,"coreId":"0xd9b2c6f60000001f","errors":[

      {"code":3000,"message":"syntax error - at UPDATE"}

      ],"idempotent":false,"lastDispatchedFrom":"192.168.100.39:52128","lastDispatchedTo":"172.23.111.133:8093","requestId":153471,"requestType":"TargetedQueryRequest","retried":0,"service":{"operationId":"51671688-63a2-4625-81d0-ce187c4dda7b","statement":"<ud>INSERT INTO `default`.`_default`.`_default` VALUES ('1d33f468-de0a-4222-bf83-3a252383493b',

      {\"content\":\"initial\"}

      );UPDATE `default`.`_default`.`_default` SET content = \"updated\" WHERE META().id = 'f6f06196-0357-4814-8e2f-35a1e45032a2'</ud>","type":"query"},"timeoutMs":130977,"timings":{"dispatchMicros":23563,"totalMicros":47192}}', but require TransactionOperationFailed com.couchbase.InternalPerformerFailure: java.lang.IllegalStateException: Command Query INSERT INTO `default`.`_default`.`_default` VALUES ('1d33f468-de0a-4222-bf83-3a252383493b', {"content":"initial"});UPDATE `default`.`_default`.`_default` SET content = "updated" WHERE META().id = 'f6f06196-0357-4814-8e2f-35a1e45032a2' raised error 'com.couchbase.client.core.error.ParsingFailureException: Parsing of the input failed {"completed":true,"coreId":"0xd9b2c6f60000001f","errors":[

      {"code":3000,"message":"syntax error - at UPDATE"}

      ],"idempotent":false,"lastDispatchedFrom":"192.168.100.39:52128","lastDispatchedTo":"172.23.111.133:8093","requestId":153471,"requestType":"TargetedQueryRequest","retried":0,"service":{"operationId":"51671688-63a2-4625-81d0-ce187c4dda7b","statement":"<ud>INSERT INTO `default`.`_default`.`_default` VALUES ('1d33f468-de0a-4222-bf83-3a252383493b',

      {\"content\":\"initial\"}

      );UPDATE `default`.`_default`.`_default` SET content = \"updated\" WHERE META().id = 'f6f06196-0357-4814-8e2f-35a1e45032a2'</ud>","type":"query"},"timeoutMs":130977,"timings":{"dispatchMicros":23563,"totalMicros":47192}}', but require TransactionOperationFailed at com.couchbase.twoway.TwoWayTransaction.performOperation(TwoWayTransaction.java:729) at com.couchbase.twoway.TwoWayTransaction.performOperation(TwoWayTransaction.java:495) at com.couchbase.twoway.TwoWayTransaction.lambda$run$3(TwoWayTransaction.java:201) at com.couchbase.transactions.TransactionsReactive.lambda$null$31(TransactionsReactive.java:581) at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73) at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32) at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:227) at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.IllegalStateException: Command Query INSERT INTO `default`.`_default`.`_default` VALUES ('1d33f468-de0a-4222-bf83-3a252383493b', {"content":"initial"});UPDATE `default`.`_default`.`_default` SET content = "updated" WHERE META().id = 'f6f06196-0357-4814-8e2f-35a1e45032a2' raised error 'com.couchbase.client.core.error.ParsingFailureException: Parsing of the input failed {"completed":true,"coreId":"0xd9b2c6f60000001f","errors":[

      {"code":3000,"message":"syntax error - at UPDATE"}

      ],"idempotent":false,"lastDispatchedFrom":"192.168.100.39:52128","lastDispatchedTo":"172.23.111.133:8093","requestId":153471,"requestType":"TargetedQueryRequest","retried":0,"service":{"operationId":"51671688-63a2-4625-81d0-ce187c4dda7b","statement":"<ud>INSERT INTO `default`.`_default`.`_default` VALUES ('1d33f468-de0a-4222-bf83-3a252383493b',

      {\"content\":\"initial\"}

      );UPDATE `default`.`_default`.`_default` SET content = \"updated\" WHERE META().id = 'f6f06196-0357-4814-8e2f-35a1e45032a2'</ud>","type":"query"},"timeoutMs":130977,"timings":{"dispatchMicros":23563,"totalMicros":47192}}', but require TransactionOperationFailed ... 15 more[7876.69 INFO] PerformerTransactionService_Performer Using version : v1_1_4 

       

       

       

      Attachments

        Activity

          People

            praneeth.bokka Praneeth Bokka (Inactive)
            praneeth.bokka Praneeth Bokka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty