KKcorps commented on code in PR #10364:
URL: https://github.com/apache/pinot/pull/10364#discussion_r1124110122
##########
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/ExecutionStatsAggregator.java:
##########
@@ -89,7 +90,7 @@ public void aggregate(ServerRoutingInstance routingInstance,
DataTable dataTable
public synchronized void aggregate(@Nullable ServerRoutingInstance
routingInstance, Map<String, String> metadata,
Map<Integer, String> exceptions) {
// Reduce on trace info.
- if (_enableTrace) {
+ if (_enableTrace &&
metadata.containsKey(DataTable.MetadataKey.TRACE_INFO.getName())) {
Review Comment:
NullPointerException without the second check. Reason being the map doesn't
contain traceInfo even when tracing i enabled for V2Engine.
##########
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/ExecutionStatsAggregator.java:
##########
@@ -89,7 +90,7 @@ public void aggregate(ServerRoutingInstance routingInstance,
DataTable dataTable
public synchronized void aggregate(@Nullable ServerRoutingInstance
routingInstance, Map<String, String> metadata,
Map<Integer, String> exceptions) {
// Reduce on trace info.
- if (_enableTrace) {
+ if (_enableTrace &&
metadata.containsKey(DataTable.MetadataKey.TRACE_INFO.getName())) {
Review Comment:
NullPointerException without the second check. Reason being the map doesn't
contain traceInfo even when tracing is enabled for V2Engine.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]