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

[ADVISOR] advisor stop session fails (panic) with Error evaluating projection - cause: Panic: interface conversion: interface {} is []interface {}, not map[string]interface {}

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Neo
    • Fix Version/s: Neo
    • Component/s: query
    • Environment:
      7.1.0-1223
    • Triage:
      Untriaged
    • Story Points:
      1
    • Is this a Regression?:
      Yes

      Description

      To repro:

      • setup single node
      • start session: SELECT ADVISOR({'action':'start', 'duration':'40m', 'profile': 'joaoDoe', 'query_count':5, 'response':'50ms'});
      • run query: 
        SELECT airportname FROM `travel-sample` WHERE type = "airport" AND lower(city) = "lyon" AND country = "France" ;
      • stop session (use session-id from above): 
        SELECT ADVISOR({'action':'stop', 'session':'6e7fd7be-c4f2-4ab1-9ac3-3daa56563b5f'});

      cbq> SELECT ADVISOR({'action':'stop', 'session':'6e7fd7be-c4f2-4ab1-9ac3-3daa56563b5f'});
      {
          "requestID": "e5e80a49-9d85-45cd-b9b9-fc75cf49bfb6",
          "signature": {
              "$1": "object"
          },
          "results": [
          ],
          "errors": [
              {
                  "code": 5010,
                  "msg": "Error evaluating projection - cause: Panic: interface conversion: interface {} is []interface {}, not map[string]interface {}"
              }
          ],
          "status": "errors",
          "metrics": {
              "elapsedTime": "44.944837ms",
              "executionTime": "44.879899ms",
              "resultCount": 0,
              "resultSize": 0,
              "serviceLoad": 6,
              "errorCount": 1
          }
      } 
      
      

       

       

      stack from query.log:

      2021-08-31T19:03:09.490+00:00 [SEVERE] panic: interface conversion: interface {} is []interface {}, not map[string]interface {}
      2021-08-31T19:03:09.491+00:00 [SEVERE] request text: <ud>DELETE from system:tasks_cache where class = "advisor"  and name = "6e7fd7be-c4f2-4ab1-9ac3-3daa56563b5f"</ud>
      2021-08-31T19:03:09.491+00:00 [SEVERE] query context: <ud></ud>
      2021-08-31T19:03:09.491+00:00 [SEVERE] stack: goroutine 8188 [running]:
      github.com/couchbase/query/execution.(*Context).Recover(0xc00124e000, 0xc000aebb00)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/context.go:985 +0xc6
      panic(0x2174e80, 0xc00127c4b0)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:971 +0x499
      github.com/couchbase/query/execution.(*base).close(0xc000aebb00, 0xc00124e000)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:273 +0x233
      panic(0x2174e80, 0xc00127c4b0)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:971 +0x499
      github.com/couchbase/query/execution.(*base).notify(0xc000aebb00)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:988 +0x178
      panic(0x2174e80, 0xc00127c4b0)
              /home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:971 +0x499
      github.com/couchbase/query/server.reportChangedValues(0xc001349508, 0xc0013494d8)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/set_params.go:347 +0x6ce
      github.com/couchbase/query/server.ProcessSettings(0xc002173650, 0xc00016c000, 0x24436a6, 0xa)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/set_params.go:334 +0x9ac
      github.com/couchbase/query/server/http.settingsWorkHorse(0xc002173650, 0xc00016c000, 0xc002148e68, 0x1)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/http/admin_clustering_endpoint.go:435 +0x9c
      github.com/couchbase/query/server/http.(*systemRemoteHttp).Settings(0xc0004f4fc0, 0xc002173650, 0xc00035cf70, 0xc001349950)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/server/http/system_remote.go:746 +0x3a
      github.com/couchbase/query/expression.(*Advisor).scheduleTask.func2(0x7f8ee05d9a28, 0xc00124ef00, 0x0, 0x0, 0x2088900, 0xc00186f400, 0xc0009c1a50, 0x24, 0xc00165cc30)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/expression/func_advisor.go:241 +0x62
      github.com/couchbase/query/scheduler.DeleteTask(0xc00165cc30, 0x24, 0xe, 0xc0014d6701)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/scheduler/scheduler.go:219 +0x3ce
      github.com/couchbase/query/datastore/system.(*tasksCacheKeyspace).Delete(0xc0001e6100, 0xc001330000, 0x1, 0x40, 0x26a6168, 0xc00124e000, 0x1, 0x6, 0xc0018bd410, 0xc000579bb0, ...)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/datastore/system/system_keyspace_tasks_cache.go:167 +0x165
      github.com/couchbase/query/execution.(*SendDelete).flushBatch(0xc000aebb00, 0xc00124e000, 0xc00060fd00)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/delete_send.go:150 +0x3ab
      github.com/couchbase/query/execution.(*SendDelete).afterItems(0xc000aebb00, 0xc00124e000)
              /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/delete_send.go:106 +0x35
      github.com/couchbase/query/execution.(*base).runConsumer.func1()
      ... 

        Attachments

          Issue Links

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

            Activity

            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-7.1.0-1231 contains query commit 058e7a0 with commit message:
            MB-48258 Correct comparing previous and current settings values

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-1231 contains query commit 058e7a0 with commit message: MB-48258 Correct comparing previous and current settings values
            Hide
            Donald.haggart Donald Haggart added a comment -

            Verification should just be re-running the noted test.

            Show
            Donald.haggart Donald Haggart added a comment - Verification should just be re-running the noted test.
            Show
            pierre.regazzoni Pierre Regazzoni added a comment - Sanity is running clean with 7.1.0-1233:  http://server.jenkins.couchbase.com/job/build_sanity_matrix/9505/DISTRO=centos7,TYPE=1node/testReport/

              People

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