[
https://issues.apache.org/jira/browse/DRILL-6286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420925#comment-16420925
]
ASF GitHub Bot commented on DRILL-6286:
---------------------------------------
Github user vrozov commented on a diff in the pull request:
https://github.com/apache/drill/pull/1196#discussion_r178376362
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/work/WorkManager.java ---
@@ -212,19 +218,29 @@ private boolean areQueriesAndFragmentsEmpty() {
return queries.isEmpty() && runningFragments.isEmpty();
}
+ /**
+ * Check if there any new queries or fragments that are added after the
shutdown is triggered
+ */
+ private boolean areNewQueriesOrFragmentsAdded() {
+ return runningFragments.size() > numOfRunningFragments ||
queries.size() > numOfRunningQueries;
+ }
+
/**
* A thread calling the {@link #waitToExit(boolean)} method is notified
when a foreman is retired.
*/
private void indicateIfSafeToExit() {
isEmptyLock.lock();
try {
- logger.info("Waiting for "+ queries.size() +" queries to complete
before shutting down");
- logger.info("Waiting for "+ runningFragments.size() +" running
fragments to complete before shutting down");
+ if (isShutdownTriggered) {
+ logger.info("Waiting for "+ queries.size() +" queries to complete
before shutting down");
--- End diff --
Use slf4j smart logging.
> Regression: incorrect reference to shutdown in drillbit.log
> -----------------------------------------------------------
>
> Key: DRILL-6286
> URL: https://issues.apache.org/jira/browse/DRILL-6286
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Vlad Rozov
> Assignee: Venkata Jyothsna Donapati
> Priority: Major
> Fix For: 1.14.0
>
>
> drillbit.log refers to shutdown even in cases when no shutdown sequence was
> initiated:
> {noformat}
> 2018-03-16 11:55:52,693 [drill-executor-19] INFO
> o.apache.drill.exec.work.WorkManager - Waiting for 0 queries to complete
> before shutting down
> 2018-03-16 11:55:52,693 [drill-executor-19] INFO
> o.apache.drill.exec.work.WorkManager - Waiting for 3 running fragments to
> complete before shutting down
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)