Github user sudheeshkatkam commented on a diff in the pull request:
https://github.com/apache/drill/pull/758#discussion_r103624801
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
---
@@ -280,31 +284,39 @@ public void interrupted(final InterruptedException
ex) {
}
}
- QueryState updateEphemeralState(final QueryState queryState) {
- switch (queryState) {
+ void updateEphemeralState(final QueryState queryState) {
+ // If query is already in zk transient store, ignore the transient
state update option.
+ // Else, they will not be removed from transient store upon
completion.
+ if (!inTransientStore &&
+
!foreman.getQueryContext().getOptions().getOption(ExecConstants.QUERY_TRANSIENT_STATE_UPDATE))
{
+ return;
+ }
+
+ switch (queryState) {
case ENQUEUED:
case STARTING:
case RUNNING:
case CANCELLATION_REQUESTED:
transientProfiles.put(stringQueryId, getQueryInfo()); // store as
ephemeral query profile.
+ inTransientStore = true;
break;
case COMPLETED:
case CANCELED:
case FAILED:
try {
transientProfiles.remove(stringQueryId);
+ inTransientStore = false;
} catch(final Exception e) {
logger.warn("Failure while trying to delete the estore profile
for this query.", e);
}
-
break;
default:
throw new IllegalStateException("unrecognized queryState " +
queryState);
}
- return queryState;
+ return;
--- End diff --
remove unnecessary return
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---