Details
-
Improvement
-
Resolution: Fixed
-
Critical
-
6.0.0
-
CX Sprint 120
Description
I have been doing some internal testing of CBAS in order to integrate it into the support tools we use for debugging issues (nutshell & supportal) and it seems we are missing some important information:
- Definitions of datasets from the CREATE DATASETS statements
- Definitions of indexes from the CREATE INDEX statements
From the datasets perspective, we can see it in the following places in the log files generated from cbcollect_info:
$ grep -ri "CREATE DATASET" .
|
Binary file ./.swp matches
|
./ns_server.analytics_info.log:2018-09-19T17:13:56.101Z INFO CBAS.server.QueryServiceServlet [HttpExecutor(port:8095)-5] handleRequest: {"host":"10.142.190.101:8091","path":"/query/service","statement":"CREATE DATASET breweries ON beerBucket WHERE `type` = \\\"brewery\\\";","pretty":false,"mode":null,"clientContextID":"b99f8fdb-e409-4206-b055-ed47961f7912","format":null,"timeout":null,"maxResultReads":null,"planFormat":"json","expressionTree":false,"rewrittenExpressionTree":false,"logicalPlan":false,"optimizedLogicalPlan":true,"job":false,"signature":true,"multiStatement":true}
|
./ns_server.analytics_info.log:2018-09-19T17:13:56.112Z INFO CBAS.messaging.CCMessageBroker [Executor-4:ClusterController] Received message: ExecuteStatementRequestMessage(id=99, from=9350beace34c416cb422626f715ff6d8): CREATE DATASET breweries ON beerBucket WHERE `type` = "brewery";;
|
./ns_server.analytics_info.log:2018-09-19T17:13:56.143Z WARN CBAS.server.QueryServiceServlet [HttpExecutor(port:8095)-5] handleException: unexpected exception CBAS0016: Bucket (beerBucket) does not exist: {"host":"10.142.190.101:8091","path":"/query/service","statement":"CREATE DATASET breweries ON beerBucket WHERE `type` = \\\"brewery\\\";","pretty":false,"mode":null,"clientContextID":"b99f8fdb-e409-4206-b055-ed47961f7912","format":null,"timeout":null,"maxResultReads":null,"planFormat":"json","expressionTree":false,"rewrittenExpressionTree":false,"logicalPlan":false,"optimizedLogicalPlan":true,"job":false,"signature":true,"multiStatement":false}
|
./ns_server.analytics_info.log:2018-09-19T20:31:13.182Z INFO CBAS.server.QueryServiceServlet [HttpExecutor(port:8095)-8] handleRequest: {"host":"10.142.190.101:8091","path":"/query/service","statement":"CREATE DATASET breweries ON `beer-sample` WHERE `type` = \\\"brewery\\\";","pretty":false,"mode":null,"clientContextID":"a95eeda4-0f98-44d8-8ec3-5c7a58ee6169","format":null,"timeout":null,"maxResultReads":null,"planFormat":"json","expressionTree":false,"rewrittenExpressionTree":false,"logicalPlan":false,"optimizedLogicalPlan":true,"job":false,"signature":true,"multiStatement":true}
|
./ns_server.analytics_info.log:2018-09-19T20:31:13.185Z INFO CBAS.messaging.CCMessageBroker [Executor-4:ClusterController] Received message: ExecuteStatementRequestMessage(id=169, from=9350beace34c416cb422626f715ff6d8): CREATE DATASET breweries ON `beer-sample` WHERE `type` = "brewery";;
|
./ns_server.analytics_info.log:2018-09-19T20:31:20.341Z INFO CBAS.server.QueryServiceServlet [HttpExecutor(port:8095)-9] handleRequest: {"host":"10.142.190.101:8091","path":"/query/service","statement":"CREATE DATASET beers ON `beer-sample` WHERE `type` = \\\"beer\\\";","pretty":false,"mode":null,"clientContextID":"59480018-be4a-4f8c-8a02-9b6daeee8d68","format":null,"timeout":null,"maxResultReads":null,"planFormat":"json","expressionTree":false,"rewrittenExpressionTree":false,"logicalPlan":false,"optimizedLogicalPlan":true,"job":false,"signature":true,"multiStatement":true}
|
./ns_server.analytics_info.log:2018-09-19T20:31:20.343Z INFO CBAS.messaging.CCMessageBroker [Executor-4:ClusterController] Received message: ExecuteStatementRequestMessage(id=173, from=9350beace34c416cb422626f715ff6d8): CREATE DATASET beers ON `beer-sample` WHERE `type` = "beer";;
|
./ns_server.analytics_warn.log:2018-09-19T17:13:56.143Z WARN CBAS.server.QueryServiceServlet [HttpExecutor(port:8095)-5] handleException: unexpected exception CBAS0016: Bucket (beerBucket) does not exist: {"host":"10.142.190.101:8091","path":"/query/service","statement":"CREATE DATASET breweries ON beerBucket WHERE `type` = \\\"brewery\\\";","pretty":false,"mode":null,"clientContextID":"b99f8fdb-e409-4206-b055-ed47961f7912","format":null,"timeout":null,"maxResultReads":null,"planFormat":"json","expressionTree":false,"rewrittenExpressionTree":false,"logicalPlan":false,"optimizedLogicalPlan":true,"job":false,"signature":true,"multiStatement":false}
|
however, all of these occurrences are volatile - that is to say there are in log files which rotate and thus may be lost by the time of collecting the logs. Instead, we should add something to the cbcollect_info script which gets these pieces of information at the time of log collection the same way the Index service does this, so that we have a non-volatile and up-to-date version of these important pieces of information. I have created and linked a CBSE to this issue with a link to the logs I created.
If I have completely over looked something and this is already being captured, can you point me in the right direction for where to find this?