github-advanced-security[bot] commented on code in PR #18148:
URL: https://github.com/apache/druid/pull/18148#discussion_r2160503938
##########
processing/src/main/java/org/apache/druid/query/ChainedExecutionQueryRunner.java:
##########
@@ -97,42 +101,54 @@
throw new ISE("Null queryRunner! Looks to be some
segment unmapping action happening");
}
- return queryProcessingPool.submitRunnerTask(
- new
AbstractPrioritizedQueryRunnerCallable<>(priority, input)
- {
- @Override
- public Iterable<T> call()
- {
- try {
- Sequence<T> result =
input.run(threadSafeQueryPlus, responseContext);
- if (result == null) {
- throw new ISE("Got a null result!
Segments are missing!");
- }
-
- List<T> retVal = result.toList();
- if (retVal == null) {
- throw new ISE("Got a null list of
results");
- }
-
- return retVal;
- }
- catch (QueryInterruptedException e) {
- throw new RuntimeException(e);
- }
- catch (QueryTimeoutException e) {
- throw e;
- }
- catch (Exception e) {
- if (query.context().isDebug()) {
- log.error(e, "Exception with one of the
sequences!");
- } else {
- log.noStackTrace().error(e, "Exception
with one of the sequences!");
- }
- Throwables.propagateIfPossible(e);
- throw new RuntimeException(e);
- }
+ final
AbstractPrioritizedQueryRunnerCallable<Iterable<T>, T> callable = new
AbstractPrioritizedQueryRunnerCallable<>(
+ priority,
+ input
+ )
+ {
+ @Override
+ public Iterable<T> call()
+ {
+ try {
+ Sequence<T> result =
input.run(threadSafeQueryPlus, responseContext);
+ if (result == null) {
+ throw new ISE("Got a null result! Segments
are missing!");
+ }
+
+ List<T> retVal = result.toList();
+ if (retVal == null) {
+ throw new ISE("Got a null list of results");
}
- });
+
+ return retVal;
+ }
+ catch (QueryInterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ catch (QueryTimeoutException e) {
+ throw e;
+ }
+ catch (Exception e) {
+ if (query.context().isDebug()) {
+ log.error(e, "Exception with one of the
sequences!");
+ } else {
+ log.noStackTrace().error(e, "Exception with
one of the sequences!");
+ }
+ Throwables.propagateIfPossible(e);
Review Comment:
## Deprecated method or constructor invocation
Invoking [Throwables.propagateIfPossible](1) should be avoided because it
has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/9252)
##########
processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByMergingQueryRunner.java:
##########
@@ -247,34 +249,43 @@
throw new ISE("Null queryRunner! Looks to be
some segment unmapping action happening");
}
- ListenableFuture<AggregateResult> future =
queryProcessingPool.submitRunnerTask(
- new
AbstractPrioritizedQueryRunnerCallable<>(priority, input)
- {
- @Override
- public AggregateResult call()
- {
- try (
- // These variables are used to close
releasers automatically.
- @SuppressWarnings("unused")
- Closeable bufferReleaser =
mergeBufferHolder.increment();
- @SuppressWarnings("unused")
- Closeable grouperReleaser =
grouperHolder.increment()
- ) {
- // Return true if OK, false if
resources were exhausted.
- return input.run(queryPlusForRunners,
responseContext)
- .accumulate(AggregateResult.ok(),
accumulator);
- }
- catch (QueryInterruptedException |
QueryTimeoutException e) {
- throw e;
- }
- catch (Exception e) {
- log.error(e, "Exception with one of
the sequences!");
- Throwables.propagateIfPossible(e);
- throw new RuntimeException(e);
- }
- }
+ final
AbstractPrioritizedQueryRunnerCallable<AggregateResult, ResultRow> callable =
new AbstractPrioritizedQueryRunnerCallable<>(priority, input)
+ {
+ @Override
+ public AggregateResult call()
+ {
+ try (
+ // These variables are used to close
releasers automatically.
+ @SuppressWarnings("unused")
+ Closeable bufferReleaser =
mergeBufferHolder.increment();
+ @SuppressWarnings("unused")
+ Closeable grouperReleaser =
grouperHolder.increment()
+ ) {
+ // Return true if OK, false if resources
were exhausted.
+ return input.run(queryPlusForRunners,
responseContext)
+
.accumulate(AggregateResult.ok(), accumulator);
}
- );
+ catch (QueryInterruptedException |
QueryTimeoutException e) {
+ throw e;
+ }
+ catch (Exception e) {
+ log.error(e, "Exception with one of the
sequences!");
+ Throwables.propagateIfPossible(e);
Review Comment:
## Deprecated method or constructor invocation
Invoking [Throwables.propagateIfPossible](1) should be avoided because it
has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/9253)
--
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]