Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.1.0
-
Untriaged
-
-
1
-
Unknown
Description
Build : 7.1.0-2373
Test : -test tests/2i/neo/test_neo_idx_clusterops_recovery.yml -scope tests/2i/neo/scope_neo_plasma_idx_dgm.yml
Scale : 2
Iteration : 1st
In the N1QL/GSI component system test, we now run JS UDFs that has N1QL statements in it continuously throughout the test. At one point, it happened that the test killed the cbq-engine process on 172.23.97.227 as part of testing random recovery, the UDF that got triggered just when the cbq-engine process restarted, resulted into a panic.
cbq-engine process started :
2022-02-24T06:49:40.104-08:00 [INFO] cbq-engine started version=7.1.0-N1QL datastore=http://127.0.0.1:8091 max-concurrency=8 loglevel=INFO servicers=32 plus-servicers=128 scan-cap=512 pipeline-cap=512 pipeline-batch=16 request-cap=256 request-size-cap=67108864 max-index-api=4 max-parallelism=1 n1ql-feat-ctrl=76 use-cbo=true timeout=0s txtimeout=0s gc-percent=200
|
2022-02-24T06:49:40.502-08:00 [SEVERE] panic: runtime error: invalid memory address or nil pointer dereference
|
2022-02-24T06:49:40.502-08:00 [SEVERE] request text: <ud>EXECUTE FUNCTION run_n1ql_query('bucket1')</ud>
|
2022-02-24T06:49:40.502-08:00 [SEVERE] query context: <ud></ud>
|
2022-02-24T06:49:40.502-08:00 [SEVERE] stack: goroutine 200 [running]:
|
github.com/couchbase/query/execution.(*Context).Recover(0xc00072ea00, 0xc0010bd200)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/context.go:1043 +0xc6
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/execution.(*base).close(0xc0010bd200, 0xc00072ea00)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:270 +0x233
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/execution.(*base).notify(0xc0010bd200)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:996 +0x178
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/functions/javascript.(*javascript).Execute(0x3b009f8, 0x28e34b8, 0xc0005a2660, 0x28dd348, 0xc001052ae0, 0x1, 0xc000643ae0, 0x1, 0x1, 0x28f2b00, ...)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/functions/javascript/javascript.go:141 +0x527
|
github.com/couchbase/query/functions.ExecuteFunction(0x28e34b8, 0xc0005a2660, 0x1, 0xc000643ae0, 0x1, 0x1, 0x28f2b00, 0xc00072ea00, 0x0, 0x0, ...)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/functions/functions.go:474 +0x2d4
|
github.com/couchbase/query/execution.(*ExecuteFunction).RunOnce.func1()
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/function_execute.go:79 +0x272
|
github.com/couchbase/query/util.(*Once).Do(0xc0010bd338, 0xc001507f50)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/util/sync.go:54 +0x4b
|
github.com/couchbase/query/execution.(*ExecuteFunction).RunOnce(0xc0010bd200, 0xc00072ea00, 0x0, 0x0)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/function_execute.go:50 +0x86
|
github.com/couchbase/query/execution.execOp(0x28f9b78, 0xc0010bd200, 0xc00072ea00, 0x0, 0x0)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:519 +0x57
|
created by github.com/couchbase/query/execution.(*base).fork
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:530 +0x105
|
goroutine 200 [running]:
|
github.com/couchbase/query/execution.(*Context).Recover(0xc00072ea00, 0xc0010bd200)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/context.go:1043 +0xc6
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/execution.(*base).close(0xc0010bd200, 0xc00072ea00)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:270 +0x233
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/execution.(*base).notify(0xc0010bd200)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:996 +0x178
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/functions/javascript.(*javascript).Execute(0x3b009f8, 0x28e34b8, 0xc0005a2660, 0x28dd348, 0xc001052ae0, 0x1, 0xc000643ae0, 0x1, 0x1, 0x28f2b00, ...)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/functions/javascript/javascript.go:141 +0x527
|
github.com/couchbase/query/functions.ExecuteFunction(0x28e34b8, 0xc0005a2660, 0x1, 0xc000643ae0, 0x1, 0x1, 0x28f2b00, 0xc00072ea00, 0x0, 0x0, ...)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/functions/functions.go:474 +0x2d4
|
github.com/couchbase/query/execution.(*ExecuteFunction).RunOnce.func1()
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/function_execute.go:79 +0x272
|
github.com/couchbase/query/util.(*Once).Do(0xc0010bd338, 0xc001507f50)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/util/sync.go:54 +0x4b
|
github.com/couchbase/query/execution.(*ExecuteFunction).RunOnce(0xc0010bd200, 0xc00072ea00, 0x0, 0x0)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/function_execute.go:50 +0x86
|
github.com/couchbase/query/execution.execOp(0x28f9b78, 0xc0010bd200, 0xc00072ea00, 0x0, 0x0)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:519 +0x57
|
created by github.com/couchbase/query/execution.(*base).fork
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:530 +0x105
|
2022-02-24T06:49:40.684-08:00 [SEVERE] panic: runtime error: invalid memory address or nil pointer dereference
|
2022-02-24T06:49:40.684-08:00 [SEVERE] request text: <ud>EXECUTE FUNCTION run_n1ql_query('bucket1')</ud>
|
2022-02-24T06:49:40.684-08:00 [SEVERE] query context: <ud></ud>
|
2022-02-24T06:49:40.684-08:00 [SEVERE] stack: goroutine 231 [running]:
|
github.com/couchbase/query/execution.(*Context).Recover(0xc000ffbb80, 0xc0010bdd40)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/context.go:1043 +0xc6
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/execution.(*base).close(0xc0010bdd40, 0xc000ffbb80)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:270 +0x233
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/execution.(*base).notify(0xc0010bdd40)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:996 +0x178
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/functions/javascript.(*javascript).Execute(0x3b009f8, 0x28e34b8, 0xc0006510e0, 0x28dd348, 0xc001052c00, 0x1, 0xc0013c55c0, 0x1, 0x1, 0x28f2b00, ...)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/functions/javascript/javascript.go:141 +0x527
|
github.com/couchbase/query/functions.ExecuteFunction(0x28e34b8, 0xc0006510e0, 0x1, 0xc0013c55c0, 0x1, 0x1, 0x28f2b00, 0xc000ffbb80, 0x0, 0x0, ...)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/functions/functions.go:474 +0x2d4
|
github.com/couchbase/query/execution.(*ExecuteFunction).RunOnce.func1()
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/function_execute.go:79 +0x272
|
github.com/couchbase/query/util.(*Once).Do(0xc0010bde78, 0xc00150bf50)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/util/sync.go:54 +0x4b
|
github.com/couchbase/query/execution.(*ExecuteFunction).RunOnce(0xc0010bdd40, 0xc000ffbb80, 0x0, 0x0)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/function_execute.go:50 +0x86
|
github.com/couchbase/query/execution.execOp(0x28f9b78, 0xc0010bdd40, 0xc000ffbb80, 0x0, 0x0)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:519 +0x57
|
created by github.com/couchbase/query/execution.(*base).fork
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:530 +0x105
|
goroutine 231 [running]:
|
github.com/couchbase/query/execution.(*Context).Recover(0xc000ffbb80, 0xc0010bdd40)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/context.go:1043 +0xc6
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/execution.(*base).close(0xc0010bdd40, 0xc000ffbb80)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:270 +0x233
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/execution.(*base).notify(0xc0010bdd40)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:996 +0x178
|
panic(0x23460c0, 0x38509d0)
|
/home/couchbase/.cbdepscache/exploded/x86_64/go-1.16.6/go/src/runtime/panic.go:965 +0x1b9
|
github.com/couchbase/query/functions/javascript.(*javascript).Execute(0x3b009f8, 0x28e34b8, 0xc0006510e0, 0x28dd348, 0xc001052c00, 0x1, 0xc0013c55c0, 0x1, 0x1, 0x28f2b00, ...)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/functions/javascript/javascript.go:141 +0x527
|
github.com/couchbase/query/functions.ExecuteFunction(0x28e34b8, 0xc0006510e0, 0x1, 0xc0013c55c0, 0x1, 0x1, 0x28f2b00, 0xc000ffbb80, 0x0, 0x0, ...)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/functions/functions.go:474 +0x2d4
|
github.com/couchbase/query/execution.(*ExecuteFunction).RunOnce.func1()
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/function_execute.go:79 +0x272
|
github.com/couchbase/query/util.(*Once).Do(0xc0010bde78, 0xc00150bf50)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/util/sync.go:54 +0x4b
|
github.com/couchbase/query/execution.(*ExecuteFunction).RunOnce(0xc0010bdd40, 0xc000ffbb80, 0x0, 0x0)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/function_execute.go:50 +0x86
|
github.com/couchbase/query/execution.execOp(0x28f9b78, 0xc0010bdd40, 0xc000ffbb80, 0x0, 0x0)
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:519 +0x57
|
created by github.com/couchbase/query/execution.(*base).fork
|
/home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/query/execution/base.go:530 +0x105
|
These messages can also be found in the logs a shortly after that again :
2022-02-24T06:49:41.226-08:00 [SEVERE] panic: runtime error: invalid memory address or nil pointer dereference
|
2022-02-24T06:49:41.226-08:00 [SEVERE] request text: <ud>EXECUTE FUNCTION run_n1ql_query('bucket1')</ud>
|
2022-02-24T06:49:41.226-08:00 [SEVERE] query context: <ud></ud>
|
2022-02-24T06:49:41.226-08:00 [SEVERE] stack: goroutine 336 [running]:
|
Query results :
select * from system:completed_requests where errorCount > 0 and errors[0].message = "Panic: runtime error: invalid memory address or nil pointer dereference"
|
[
|
{
|
"completed_requests": {
|
"clientContextID": "query_thread_1",
|
"elapsedTime": "2.58275ms",
|
"errorCount": 1,
|
"errors": [
|
{
|
"caller": "context:1060",
|
"code": 5001,
|
"key": "execution.panic",
|
"message": "Panic: runtime error: invalid memory address or nil pointer dereference"
|
}
|
],
|
"n1qlFeatCtrl": 76,
|
"node": "172.23.97.227:8091",
|
"optimizerEstimates": null,
|
"phaseOperators": {
|
"authorize": 1,
|
"stream": 1
|
},
|
"phaseTimes": {
|
"authorize": "18.338µs",
|
"instantiate": "34.768µs",
|
"parse": "283.826µs",
|
"plan": "9.181µs",
|
"run": "2.115825ms",
|
"stream": "16.13µs"
|
},
|
"remoteAddr": "172.23.106.127:53322",
|
"requestId": "aa8f5a37-69d5-4cac-8771-3f5c50196c1d",
|
"requestTime": "2022-02-24T06:49:40.681-08:00",
|
"resultCount": 0,
|
"resultSize": 0,
|
"scanConsistency": "scan_plus",
|
"serviceTime": "2.468931ms",
|
"state": "aborted",
|
"statement": "EXECUTE FUNCTION run_n1ql_query('bucket1')",
|
"statementType": "EXECUTE_FUNCTION",
|
"useCBO": true,
|
"userAgent": "couchbase-java-client/${project.version} (git: ${git.commit.id.describe}, core: ${git.commit.id.describe}) (Linux/3.10.0-1160.2.2.el7.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0_322-b06)",
|
"users": "Administrator"
|
}
|
},
|
{
|
"completed_requests": {
|
"clientContextID": "query_thread_0",
|
"elapsedTime": "6.823538ms",
|
"errorCount": 1,
|
"errors": [
|
{
|
"caller": "context:1060",
|
"code": 5001,
|
"key": "execution.panic",
|
"message": "Panic: runtime error: invalid memory address or nil pointer dereference"
|
}
|
],
|
"n1qlFeatCtrl": 76,
|
"node": "172.23.97.227:8091",
|
"optimizerEstimates": null,
|
"phaseOperators": {
|
"authorize": 1,
|
"stream": 1
|
},
|
"phaseTimes": {
|
"authorize": "1.609324ms",
|
"instantiate": "64.492µs",
|
"parse": "548.521µs",
|
"plan": "88.01µs",
|
"run": "5.870809ms",
|
"stream": "26.718µs"
|
},
|
"remoteAddr": "172.23.106.127:53326",
|
"requestId": "d8b83b44-4869-404e-8921-90b3a9b2a1d0",
|
"requestTime": "2022-02-24T06:49:40.496-08:00",
|
"resultCount": 0,
|
"resultSize": 0,
|
"scanConsistency": "scan_plus",
|
"serviceTime": "6.629957ms",
|
"state": "aborted",
|
"statement": "EXECUTE FUNCTION run_n1ql_query('bucket1')",
|
"statementType": "EXECUTE_FUNCTION",
|
"useCBO": true,
|
"userAgent": "couchbase-java-client/${project.version} (git: ${git.commit.id.describe}, core: ${git.commit.id.describe}) (Linux/3.10.0-1160.2.2.el7.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0_322-b06)",
|
"users": "Administrator"
|
}
|
},
|
{
|
"completed_requests": {
|
"clientContextID": "query_thread_4",
|
"elapsedTime": "5.478732ms",
|
"errorCount": 1,
|
"errors": [
|
{
|
"caller": "context:1060",
|
"code": 5001,
|
"key": "execution.panic",
|
"message": "Panic: runtime error: invalid memory address or nil pointer dereference"
|
}
|
],
|
"n1qlFeatCtrl": 76,
|
"node": "172.23.97.227:8091",
|
"optimizerEstimates": null,
|
"phaseOperators": {
|
"authorize": 1,
|
"stream": 1
|
},
|
"phaseTimes": {
|
"authorize": "22.83µs",
|
"instantiate": "22.427µs",
|
"parse": "380.985µs",
|
"plan": "12.68µs",
|
"run": "4.980124ms",
|
"stream": "3.969µs"
|
},
|
"remoteAddr": "172.23.106.127:53322",
|
"requestId": "ba280be5-0254-4a18-b602-31c4c875ea77",
|
"requestTime": "2022-02-24T06:49:41.221-08:00",
|
"resultCount": 0,
|
"resultSize": 0,
|
"scanConsistency": "scan_plus",
|
"serviceTime": "5.425911ms",
|
"state": "aborted",
|
"statement": "EXECUTE FUNCTION run_n1ql_query('bucket1')",
|
"statementType": "EXECUTE_FUNCTION",
|
"useCBO": true,
|
"userAgent": "couchbase-java-client/${project.version} (git: ${git.commit.id.describe}, core: ${git.commit.id.describe}) (Linux/3.10.0-1160.2.2.el7.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0_322-b06)",
|
"users": "Administrator"
|
}
|
},
|
{
|
"completed_requests": {
|
"clientContextID": "query_thread_4",
|
"elapsedTime": "9.625675ms",
|
"errorCount": 1,
|
"errors": [
|
{
|
"caller": "context:1060",
|
"code": 5001,
|
"key": "execution.panic",
|
"message": "Panic: runtime error: invalid memory address or nil pointer dereference"
|
}
|
],
|
"n1qlFeatCtrl": 76,
|
"node": "172.23.97.227:8091",
|
"optimizerEstimates": null,
|
"phaseOperators": {
|
"authorize": 1,
|
"stream": 1
|
},
|
"phaseTimes": {
|
"authorize": "24.049µs",
|
"instantiate": "20.711µs",
|
"parse": "473.803µs",
|
"plan": "14.007µs",
|
"run": "8.984829ms",
|
"stream": "3.259µs"
|
},
|
"remoteAddr": "172.23.106.127:53320",
|
"requestId": "f6fad82c-1847-4b91-af2d-e52657c832d5",
|
"requestTime": "2022-02-24T06:49:41.313-08:00",
|
"resultCount": 0,
|
"resultSize": 0,
|
"scanConsistency": "scan_plus",
|
"serviceTime": "9.521964ms",
|
"state": "aborted",
|
"statement": "EXECUTE FUNCTION run_n1ql_query('bucket1')",
|
"statementType": "EXECUTE_FUNCTION",
|
"useCBO": true,
|
"userAgent": "couchbase-java-client/${project.version} (git: ${git.commit.id.describe}, core: ${git.commit.id.describe}) (Linux/3.10.0-1160.2.2.el7.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0_322-b06)",
|
"users": "Administrator"
|
}
|
}
|
]
|
The UDF library:
function random_index_on_bucket(bkt) {
|
var iter = select name,keyspace_id,scope_id from system:all_indexes where `bucket_id` = $bkt and `using`='gsi';
|
let indexes = [];
|
for (const row of iter) {
|
indexes.push(row);
|
}
|
random_index = indexes[Math.floor(Math.random() * indexes.length)];
|
return random_index
|
}
|
|
function run_n1ql_query(bucket_name) {
|
// Get a random index from bucket
|
var index = random_index_on_bucket(bucket_name);
|
|
// Get index name and keyspace
|
var idx_name = index["name"];
|
var idx_template = idx_name.split("_")[0];
|
var scope_name = index["scope_id"];
|
var collection_name = index["keyspace_id"];
|
|
full_keyspace = "`" + bucket_name + "`.`" + scope_name + "`.`" + collection_name + "`"
|
|
var query = N1QL(query_template(idx_template, full_keyspace), {});
|
let iter = query[Symbol.iterator]();
|
var result = iter.next();
|
query.close();
|
|
return result.value
|
}
|
|
function query_template (index, keyspace) {
|
var query_template = {
|
"idx1": "select meta().id from keyspacenameplaceholder where country is not null and `type` is not null and (any r in reviews satisfies r.ratings.`Check in / front desk` is not null end) limit 100",
|
"idx2": "select avg(price) as AvgPrice, min(price) as MinPrice, max(price) as MaxPrice from keyspacenameplaceholder where free_breakfast=True and free_parking=True and price is not null and array_count(public_likes)>5 and `type`='Hotel' group by country limit 100",
|
"idx3": "select city,country,count(*) from keyspacenameplaceholder where free_breakfast=True and free_parking=True group by country,city order by country,city limit 100 offset 100",
|
"idx4": "WITH city_avg AS (SELECT city, AVG(price) AS avgprice FROM keyspacenameplaceholder WHERE price IS NOT NULL GROUP BY city) SELECT h.name, h.price FROM keyspacenameplaceholder h JOIN city_avg ON h.city = city_avg.city WHERE h.price < city_avg.avgprice AND h.price IS NOT NULL LIMIT 10;",
|
"idx5": "SELECT h.name, h.city, r.author FROM keyspacenameplaceholder h UNNEST reviews AS r WHERE r.ratings.Rooms < 2 AND h.avg_rating >= 3 ORDER BY r.author DESC LIMIT 100;",
|
"idx6": "SELECT COUNT(*) FILTER (WHERE free_breakfast = TRUE) AS count_free_breakfast, COUNT(*) FILTER (WHERE free_parking = TRUE) AS count_free_parking, COUNT(*) FILTER (WHERE free_breakfast = TRUE AND free_parking = TRUE) AS count_free_parking_and_breakfast FROM keyspacenameplaceholder WHERE city LIKE 'North%' ORDER BY count_free_parking_and_breakfast DESC LIMIT 10",
|
"idx7": "SELECT h.name,h.country,h.city,h.price,DENSE_RANK() OVER (window1) AS `rank` FROM keyspacenameplaceholder AS h WHERE h.price IS NOT NULL WINDOW window1 AS ( PARTITION BY h.country ORDER BY h.price NULLS LAST) LIMIT 10;",
|
"idx8": "SELECT * FROM keyspacenameplaceholder AS d WHERE ANY r IN d.reviews SATISFIES r.author LIKE 'M%' AND r.ratings.Cleanliness = 3 END AND free_parking = TRUE AND country IS NOT NULL",
|
"idx9": "SELECT * FROM keyspacenameplaceholder AS d WHERE ANY r IN d.reviews SATISFIES r.author LIKE 'M%' and r.ratings.Rooms > 3 END AND free_parking = True",
|
"idx10": "SELECT * FROM keyspacenameplaceholder AS d WHERE ANY r IN d.reviews SATISFIES ANY n:v IN r.ratings SATISFIES n = 'Overall' AND v = 2 END END",
|
"idx11": "SELECT * FROM keyspacenameplaceholder AS d WHERE ANY r IN d.reviews SATISFIES r.ratings.Rooms = 3 and r.ratings.Cleanliness > 1 END AND free_parking = True"
|
}
|
return query_template[index].replace("keyspacenameplaceholder", keyspace);
|
}
|
Query nodes : 172.23.97.227, 172.23.97.236
Attachments
For Gerrit Dashboard: MB-51169 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
171343,3 | MB-51169 Address race condition between initialisation and servicing of first requests | master | query | Status: MERGED | +2 | +1 |