gianm commented on code in PR #12514:
URL: https://github.com/apache/druid/pull/12514#discussion_r872718803
##########
processing/src/main/java/org/apache/druid/query/spec/SpecificSegmentQueryRunner.java:
##########
@@ -64,18 +68,26 @@ public Sequence<T> run(final QueryPlus<T> input, final
ResponseContext responseC
)
);
- final Query<T> query = queryPlus.getQuery();
+ final boolean setName =
input.getQuery().getContextBoolean(CTX_SET_THREAD_NAME, true);
- final Thread currThread = Thread.currentThread();
- final String currThreadName = currThread.getName();
- final String newName = query.getType() + "_" + query.getDataSource() + "_"
+ query.getIntervals();
+ final Query<T> query = queryPlus.getQuery();
- final Sequence<T> baseSequence = doNamed(
- currThread,
- currThreadName,
- newName,
- () -> base.run(queryPlus, responseContext)
- );
+ final Thread currThread = setName ? Thread.currentThread() : null;
+ final String currThreadName = setName ? currThread.getName() : null;
Review Comment:
I tried that at first, and then realized there's another usage of these
variables at line 164.
--
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]