Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.0.0
-
5.0.0-2759
-
Untriaged
-
Yes
Description
Test which shows the bug:
./testrunner -i rqg.ini -p gsi_type=forestdb -t rqg.test_rqg.RQGTests.test_rqg_concurrent,test_file_path=b/resources/rqg/multiple_table_db/query_test_using_templates/query_10000_subqueries.txt.zip,password=password,database=multiple_table_db,reset_database=True,concurreny_count=10,index_quota_percent=30,use_mysql=True,replicas=0,nodes_init=1,total_queries=2000,password=password,subquery=True |
rqg.ini:
[global]
port:8091
username:root
password:couchbase
index_port:9102
[servers]
1:SERVER_1
[SERVER_1]
ip:172.23.109.38
services=n1ql,kv,index
[membase]
rest_username:Administrator
rest_password:password
[tuq_client]
goroot:/root/n1ql/go
sherlock_path=/opt/couchbase/bin
Please feel free to use this cluster.
What the test does?
1.creates primary index.
2.Runs long running subqueries with different combination of datatypes (subqueries created after subquery enhancement feature)
3.Compares results with same query run against mysql.
After the test runs 1000 queries, check for active_requests, it shows completed requests also:
cbq> select * from system:active_requests;
|
{
|
"requestID": "2870a404-57ac-41c1-b1fd-2f34b88701ef", |
"signature": { |
"*": "*" |
},
|
"results": [ |
{
|
"active_requests": { |
"elapsedTime": "1h31m44.268580914s", |
"executionTime": "1h31m44.268475783s", |
"node": "127.0.0.1:8091", |
"phaseCounts": { |
"fetch": 1000, |
"primaryScan": 1000 |
},
|
"phaseOperators": { |
"authorize": 1, |
"fetch": 1, |
"primaryScan": 1, |
"sort": 2 |
},
|
"remoteAddr": "192.168.2.208:50749", |
"requestId": "79de2cf5-3684-47bb-a171-3589c0838346", |
"requestTime": "2017-05-03 09:22:43.415837058 -0700 PDT", |
"scanConsistency": "scan_plus", |
"state": "completed", |
|
"userAgent": "Python-httplib2/$Rev: 259 $", |
"users": "Administrator" |
}
|
},
|
{
|
"active_requests": { |
"elapsedTime": "1h31m34.046874015s", |
"executionTime": "1h31m34.04673949s", |
"node": "127.0.0.1:8091", |
"phaseCounts": { |
"fetch": 1000, |
"primaryScan": 1000, |
"sort": 201 |
},
|
"phaseOperators": { |
"authorize": 1, |
"fetch": 1, |
"primaryScan": 1, |
"sort": 100 |
},
|
"remoteAddr": "192.168.2.208:50835", |
"requestId": "563c9d69-864f-4584-a88d-c9c884e03283", |
"requestTime": "2017-05-03 09:22:53.637619931 -0700 PDT", |
"scanConsistency": "scan_plus", |
"state": "completed", |
"userAgent": "Python-httplib2/$Rev: 259 $", |
"users": "Administrator" |
}
|
},
|
{
|
"active_requests": { |
"elapsedTime": "55.619344091s", |
"executionTime": "55.619267623s", |
"node": "127.0.0.1:8091", |
"phaseCounts": { |
"fetch": 2000, |
"primaryScan": 1000, |
"sort": 10 |
},
|
"phaseOperators": { |
"authorize": 1, |
"fetch": 1001, |
"primaryScan": 1, |
"sort": 6 |
},
|
"remoteAddr": "10.17.1.169:52025", |
"requestId": "a6c6703d-bacd-4051-aef3-ef755bbf6cf1", |
"requestTime": "2017-05-03 10:53:32.065200514 -0700 PDT", |
"scanConsistency": "scan_plus", |
"state": "completed", |
"users": "Administrator" |
}
|
},
|
{
|
"active_requests": { |
"elapsedTime": "1h31m36.923046996s", |
"executionTime": "1h31m36.922758569s", |
"node": "127.0.0.1:8091", |
"phaseCounts": { |
"fetch": 2000, |
"primaryScan": 1000, |
"sort": 2953 |
},
|
"phaseOperators": { |
"authorize": 1, |
"fetch": 1001, |
"primaryScan": 1, |
"sort": 1476 |
},
|
"remoteAddr": "192.168.2.208:50803", |
"requestId": "eab6bc67-1a1f-4858-8edf-4dbbaecaf332", |
"requestTime": "2017-05-03 09:22:50.761539302 -0700 PDT", |
"scanConsistency": "scan_plus", |
"state": "completed", |
"statement": " SELECT t_5.*,(SELECT sum(t_1.qty) FROM t_5.simple_table_2 t_1 WHERE t_1.primary_key_id=t_5.primary_key_id GROUP BY t_1.price ORDER BY t_1.price limit 1) ABC FROM multiple_table_db_1780_simple_table_1 t_5 WHERE EXISTS (SELECT * FROM multiple_table_db_1780_simple_table_1 t_1 USE KEYS [t_5.primary_key_id] WHERE ((NOT ((t_1.int_field1 IN [ 3 , 24 , 35 , 36 , 37 ]) OR (t_1.decimal_field1 >= 4971))) OR ((t_1.bool_field1 = false AND t_1.decimal_field1 >= 4971))) AND (((t_1.varchar_field1 IS NOT NULL AND t_1.decimal_field1 <= 4971)) OR ((t_1.bool_field1 = false OR t_1.char_field1 = \"N\"))) ) order by meta().id limit 5", |
"userAgent": "Python-httplib2/$Rev: 259 $", |
"users": "Administrator" |
}
|
},
|
{
|
"active_requests": { |
"elapsedTime": "1h30m22.276080506s", |
"executionTime": "1h30m22.276019396s", |
"node": "127.0.0.1:8091", |
"phaseCounts": { |
"fetch": 1000, |
"primaryScan": 1000, |
"sort": 4005 |
},
|
"phaseOperators": { |
"authorize": 1, |
"fetch": 1, |
"primaryScan": 1, |
"sort": 2002 |
},
|
"remoteAddr": "192.168.2.208:50891", |
"requestId": "cb844a65-e993-4891-a469-b5d0fe2b91bd", |
"requestTime": "2017-05-03 09:24:05.408543835 -0700 PDT", |
"scanConsistency": "scan_plus", |
"state": "completed", |
"statement": "SELECT tb_G6239.* FROM (SELECT tb_J6239.* FROM (SELECT tb_M6239.* FROM ( SELECT t_5.*,(SELECT sum(t_1.qty) FROM t_5.simple_table_2 t_1 WHERE t_1.primary_key_id=t_5.primary_key_id GROUP BY t_1.price ORDER BY t_1.price limit 1) ABC FROM multiple_table_db_1780_simple_table_1 t_5 WHERE EXISTS (SELECT * FROM t_5.simple_table_2 t_2 WHERE NOT (((NOT ((NOT ((NOT (NOT (t_2.productId IS NULL))) AND (NOT ((t_2.qty = false AND t_2.qty < 5113))))) OR (((((((((t_2.qty != 5113) OR (t_2.qty <= 5113) OR (NOT (t_2.productId <= \"snack\")) AND (t_2.order_id IS NOT NULL))) AND ((NOT (t_2.qty) OR t_2.price >= 5013))) OR (NOT (t_2.price >= 5013))) AND (((t_2.qty OR t_2.price < 5013)) AND (NOT ((t_2.qty < 5113) AND (t_2.price > 5013))))) AND ((((t_2.qty IS NOT NULL AND t_2.productId = \"snack\" AND t_2.qty != false)) AND ((t_2.qty > 5113 AND t_2.order_id IS NOT NULL AND t_2.qty = true)) OR (t_2.qty) AND ((t_2.qty > 5113 OR t_2.order_id IS NOT NULL))) AND (((t_2.qty != 5113) AND (t_2.qty IS NOT NULL) AND (t_2.productId NOT LIKE '%snack') AND (t_2.productId IS NOT NULL) AND t_2.qty != false)))) AND ((t_2.price > 5013 AND (t_2.order_id = \"order-R_7551AgjhKfWQpJ\") OR (t_2.productId IS NULL) AND NOT (t_2.qty)))) AND (((t_2.qty IS NULL OR t_2.primary_key_id >= \"549\")) OR ((t_2.qty = false OR (t_2.primary_key_id NOT BETWEEN \"1\" and \"999\") OR (t_2.primary_key_id IN [ \"1\" , \"10\" , \"100\" , \"1000\" , \"101\" ]))))))) OR (NOT ((t_2.qty AND t_2.productId < \"snack\")))) OR (NOT (t_2.qty != false))) ) ) tb_M6239) tb_J6239) tb_G6239 order by meta().id limit 5", |
"userAgent": "Python-httplib2/$Rev: 259 $", |
"users": "Administrator" |
}
|
},
|
{
|
"active_requests": { |
"elapsedTime": "4m39.625508061s", |
"executionTime": "4m39.625460123s", |
"node": "127.0.0.1:8091", |
"phaseCounts": { |
"fetch": 528, |
"primaryScan": 808 |
},
|
"phaseOperators": { |
"authorize": 1, |
"fetch": 1, |
"primaryScan": 1 |
},
|
"remoteAddr": "127.0.0.1:39543", |
"requestId": "4b73ba60-b9f9-4b76-a826-0092ac38e2d5", |
"requestTime": "2017-05-03 10:49:48.059160057 -0700 PDT", |
"scanConsistency": "unbounded", |
"state": "running", |
"statement": "select completed_requests.* from system:completed_requests", |
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 (Couchbase Query Workbench (5.0.0-2759-enterprise))", |
"users": "Administrator" |
}
|
},
|
{
|
"status": "success", |
"metrics": { |
"elapsedTime": "149.06144ms", |
"executionTime": "148.993903ms", |
"resultCount": 31, |
"resultSize": 53081 |
}
|
}
|
|
Not putting the full result here since its too long and exceeds the allowed limit here.
Attaching screenshot from UI also.
I have not seen this issue in 4.5.1
Attachments
Issue Links
- duplicates
-
MB-24649 [N1QL Monitoring] infer command showing in a active requests multiple times
- Closed