Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-1295

Transactions not giving document or right error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • .future
    • None
    • transactions
    • None
    • 1

    Description

      If there is issue it returns document not found error vs actual error. This miss leads the customer/result in wrong results.

      From 7.2.0-1087 we have hit with MB-52003

      UPSERT INTO default VALUES("k01",{"a":1}), VALUES("k02",{"a":1});
      BEGIN WORK;
      DELETE FROM default USE KEYS ["k01", "k02"];
      COMMIT;
      

       

      {
          "requestID": "a9f0aaf2-cdb4-4e3e-9159-6a3588fc0214",
          "signature": "json",
          "results": [
          ],
          "errors": [
              {
                  "cause": {
                      "cause": [
                          {
                              "cause": {
                                  "bucket": "dfault",
                                  "collection": "_default",
                                  "document_key": "k01",
                                  "last_connection_id": "f0e5ebb2a358e909/7248844f52c41b77",
                                  "last_dispatched_from": "127.0.0.1:40890",
                                  "last_dispatched_to": "127.0.0.1:11210",
                                  "msg": "EOF",
                                  "scope": "_default"
                              },
                              "raise": "failed_post_commit",
                              "retry": false,
                              "rollback": false
                          },
                          {
                              "cause": {
                                  "bucket": "default",
                                  "collection": "_default",
                                  "document_key": "k02",
                                  "last_connection_id": "f0e5ebb2a358e909/f71def3ab48aeaf5",
                                  "last_dispatched_from": "127.0.0.1:40888",
                                  "last_dispatched_to": "127.0.0.1:11210",
                                  "msg": "EOF",
                                  "scope": "_default"
                              },
                              "raise": "failed_post_commit",
                              "retry": false,
                              "rollback": false
                          }
                      ],
                      "raise": "failed_post_commit",
                      "retry": false,
                      "rollback": false
                  },
                  "code": 17018,
                  "msg": "Failed post commit"
              }
          ],
          "status": "errors",
          "metrics": {
              "elapsedTime": "4.25179ms",
              "executionTime": "4.149973ms",
              "resultCount": 0,
              "resultSize": 0,
              "serviceLoad": 0,
              "transactionElapsedTime": "18.814336ms",
              "errorCount": 1
          }
      } 

      Now we hit MB-52003  (Some thing like above) and try following

      BEGIN WORK;
      SELECT META(d).id FROM default AS d USE KEYS ["k01", "k02"];
      ROLLBACK;

      Here due to MB-52003 under neath connection might be issue (or document atr record might not have cleaned up) and should have returned the proper error instead gocbcore-transactions returns document not found and query  assumes document not present. The actual error should reflect this.

      Non-transactions returns actual document.

      SELECT META(d).id FROM default AS d USE KEYS ["k01", "k02"];

       

      Assumed result is right due to delete, following gives found staged non-insert mutation: document already exists

       

      BEGIN WORK;INSERT INTO default VALUES("k01",{"a":1}), VALUES("k02",{"a":1});COMMIT;
      

       

       

      Attachments

        Issue Links

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

          Activity

            People

              charles.dixon Charles Dixon
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty