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

[ADVISOR] session list error and session get is empty

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 7.1.0
    • 7.1.0
    • query
    • 7.1.0-2193
    • Untriaged
    • 1
    • Yes

    Description

      Since build 2193, we are seeing following regression in sanity with advisor session.

      To repro:

      • setup single node server
      • load travel-sample
      • start session:
        SELECT ADVISOR({'action':'start', 'duration':'40m', 'query_count':5, 'response':'50ms'});
      • run queries:
        SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "lyon" AND country = "France";
        SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "grenoble" AND country = "France";
        SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "lyon" AND country = "France";
      • stop session:
        SELECT ADVISOR({'action':'stop', 'session':'59a5f936-5b08-490a-bfc4-93369bf20c85'});
      • get session:
        SELECT ADVISOR({'action':'get', 'session':'59a5f936-5b08-490a-bfc4-93369bf20c85'});
      • list session:
        SELECT ADVISOR({'action':'list'});

       

      get session is empty:

      cbq> SELECT ADVISOR({'action':'get', 'session':'59a5f936-5b08-490a-bfc4-93369bf20c85'});
      {
          "requestID": "cfc71738-08a6-40ba-8686-af1fce9b4d0d",
          "signature": {
              "$1": "object"
          },
          "results": [
          {
              "$1": []
          }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "40.571296ms",
              "executionTime": "40.32732ms",
              "resultCount": 1,
              "resultSize": 24,
              "serviceLoad": 6
          }
      }
       

      and list session shows error:

      cbq> SELECT ADVISOR({'action':'list'});
      {
          "requestID": "348ac78c-ca15-41fb-99ae-3141bc5f0752",
          "signature": {
              "$1": "object"
          },
          "results": [
          {
              "$1": [
                  {
                      "tasks_cache": {
                          "class": "advisor",
                          "delay": "40m0s",
                          "errors": [
                              {
                                  "caller": "func_advisor:254",
                                  "code": 5000,
                                  "icause": "syntax error - line 1, column 132, near 'entType IN ('SELECT'', at: ,",
                                  "key": "Internal Error",
                                  "message": ""
                              }
                          ],
                          "id": "9cf2cf40-3a36-5288-aa3a-16af0dd88fd7",
                          "name": "59a5f936-5b08-490a-bfc4-93369bf20c85",
                          "node": "127.0.0.1:8091",
                          "state": "cancelled",
                          "subClass": "analyze",
                          "submitTime": "2022-01-31 08:43:09.15842702 -0800 PST m=+2315.102687730"
                      }
                  }
              ]
          }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "39.987992ms",
              "executionTime": "39.803913ms",
              "resultCount": 1,
              "resultSize": 961,
              "serviceLoad": 6
          }
      } 

       

      Attachments

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

        Activity

          Sitaram.Vemulapalli Sitaram Vemulapalli added a comment - Donald Haggart can u change this https://github.com/couchbase/query/blob/master/expression/func_advisor.go#L263

          Build couchbase-server-7.1.0-2199 contains query commit d831ca4 with commit message:
          MB-50698. Use ARRAY brackets

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-2199 contains query commit d831ca4 with commit message: MB-50698 . Use ARRAY brackets

          Verified on 7.1.0-2201 sanity

          pierre.regazzoni Pierre Regazzoni added a comment - Verified on 7.1.0-2201 sanity

          People

            pierre.regazzoni Pierre Regazzoni
            pierre.regazzoni Pierre Regazzoni
            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