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

[Backport] - N1QL exception not bring propagated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 6.0.1
    • 6.0.0
    • eventing
    • None
    • Untriaged
    • Unknown

    Description

      When I run below through eventing server, all requests return success though many N1QL statements failed.

      function OnUpdate(doc,meta) {
          log("Trying:", meta.id);
          try {
             UPDATE dst AS d USE KEYS "k01" SET d = d+1;
             log("Success:", meta.id)
          } catch (e) {
              log("Exception:", e)
          }
      }
      

      I verified this with wireshark:

      HTTP/1.0 200 OK
      {
      "requestID": "f6e08658-c092-4a02-bda6-ed065621a7a4",
      "results": [
      ],
      "errors": [{"code":12009,"msg":"DML Error, possible causes include CAS mismatch or concurrent modificationFailed to perform update - cause: MCResponse status=KEY_EEXISTS, opcode=SET, opaque=0, msg: "}],
      "status": "errors",
      }
      

      But the handler throws no exception when above happens.

      Attachments

        1. eventing.log.gz
          282 kB
        2. handler.log.gz
          15 kB
        3. query.log.gz
          0.5 kB
        4. trace8093.pcap.gz
          10 kB

        Issue Links

          For Gerrit Dashboard: MB-32316
          # Subject Branch Project Status CR V

          Activity

            People

              vikas.chaudhary Vikas Chaudhary
              jeelan.poola Jeelan Poola
              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