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

Advanced cbq shell: query result shows status:timeout but it actually executes completely

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • 4.5.0
    • 4.5.0
    • query
    • Untriaged
    • Unknown

    Description

      {nformat}

      Execute this file through go_cbq:
      \set -timeout "10ms";
      create primary index on default;
      select * from default limit 2;

      Command though go_cbq:
      ./go_cbq -engine="http://localhost:8093" -s="\source /tmp/test"

      Result:
      ./go_cbq -engine="http://localhost:8093" -s="\source /tmp/test"
      Connected to : http://localhost:8093/. Type Ctrl-D to exit.

      \set -timeout "10ms";

      create primary index on default;
      {
      "requestID": "f4157c80-07b7-4baf-b731-f76b7a8dfda6",
      "signature": null,
      "results": [
      ],
      "status": "timeout",
      "metrics":

      { "elapsedTime": "10.408197ms", "executionTime": "10.266358ms", "resultCount": 0, "resultSize": 0 }

      }

      select * from default limit 2;
      {
      "requestID": "c19fb275-cc86-492a-a123-e5457df775e7",
      "errors": [

      { "code": 4000, "msg": "No primary index on keyspace default. Use CREATE PRIMARY INDEX to create one." }

      ],
      "status": "fatal",
      "metrics":

      { "elapsedTime": "2.582048ms", "executionTime": "2.465415ms", "resultCount": 0, "resultSize": 0, "errorCount": 1 }

      }

      Above result is correct.

      Then execute the script again, we get the following result:

      [root@localhost bin]# ./go_cbq -engine="http://localhost:8093" -s="\source /tmp/test"
      Connected to : http://localhost:8093/. Type Ctrl-D to exit.

      \set -timeout "10ms";

      create primary index on default;
      {
      "requestID": "86bca593-d8dc-4eb1-ae33-aa6a9e6807c6",
      "signature": null,
      "results": [
      ],
      "errors": [

      { "code": 5000, * "msg": "GSI CreatePrimaryIndex() - cause: Index #primary already exist."* }

      ],
      "status": "errors",
      "metrics":

      { "elapsedTime": "2.273261ms", "executionTime": "2.116024ms", "resultCount": 0, "resultSize": 0, "errorCount": 1 }

      }

      select * from default limit 2;
      {
      "requestID": "054bce7d-e266-46e7-9c19-95b92c6846e7",
      "signature":

      { "*": "*" }

      ,
      "results": [
      ],
      "status": "timeout",
      "metrics":

      { "elapsedTime": "10.369628ms", "executionTime": "10.240972ms", "resultCount": 0, "resultSize": 0 }

      }

      Above result is wrong.
      Checked UI, the primary index did get created.
      Same scenario applies when we have the following script:
      \set -timeout "10ms";
      drop primary index on default;
      select * from default limit 2;

      Attachments

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

        Activity

          People

            isha Isha Kandaswamy (Inactive)
            Prerna.Manaktala Prerna Manaktala (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