oleg-vlsk commented on code in PR #11317:
URL: https://github.com/apache/ignite/pull/11317#discussion_r1591748004
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java:
##########
@@ -1434,22 +1439,25 @@ protected GridCloseableIterator scanQueryLocal(final
GridCacheQueryAdapter qry,
new InternalScanFilter<>(qry.scanFilter()) : null;
try {
- assert qry.type() == SCAN;
+ assert qry.type() == SCAN || qry.type() == INDEX;
if (log.isDebugEnabled())
- log.debug("Running local SCAN query: " + qry);
-
- final String taskName =
cctx.kernalContext().task().resolveTaskName(qry.taskHash());
- final ClusterNode locNode = cctx.localNode();
+ log.debug("Running local " + qry.type() + " query: " + qry);
if (cctx.events().isRecordable(EVT_CACHE_QUERY_EXECUTED)) {
+ final String taskName =
cctx.kernalContext().task().resolveTaskName(qry.taskHash());
+
+ final ClusterNode locNode = cctx.localNode();
+
+ final String clsName = qry.queryClassName();
+
cctx.gridEvents().record(new CacheQueryExecutedEvent<>(
locNode,
- "Scan query executed.",
+ qry.type() + " query executed.",
EVT_CACHE_QUERY_EXECUTED,
- CacheQueryType.SCAN.name(),
+ qry.type() == SCAN ? CacheQueryType.SCAN.name() :
CacheQueryType.INDEX.name(),
namex,
- null,
+ clsName,
Review Comment:
Before this code was used for scan queries only, so the class name was
irrelevant for cache query events and therefore was always ‘null’. Now this
code processes both scan and index queries, and with index queries we need to
record the name of the queried class to the event.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]