Github user adeneche commented on a diff in the pull request: https://github.com/apache/drill/pull/503#discussion_r63578261 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java --- @@ -1206,42 +1210,18 @@ public void interrupted(final InterruptedException e) { } /** - * Provides gated access to state transitions. - * - * <p>The StateListener waits on a latch before delivery state transitions to the Foreman. The - * latch will be tripped when the Foreman is sufficiently set up that it can receive and process - * external events from other threads. - */ - public class StateListener { - /** - * Move the Foreman to the specified new state. - * - * @param newState the state to move to - * @param ex if moving to a failure state, the exception that led to the failure; used for reporting - * to the user - */ - public void moveToState(final QueryState newState, final Exception ex) { - acceptExternalEvents.awaitUninterruptibly(); - - Foreman.this.moveToState(newState, ex); - } - } - - /** * Listens for the status of the RPC response sent to the user for the query. */ private class ResponseSendListener extends BaseRpcOutcomeListener<Ack> { @Override public void failed(final RpcException ex) { logger.info("Failure while trying communicate query result to initiating client. " + "This would happen if a client is disconnected before response notice can be sent.", ex); - stateListener.moveToState(QueryState.FAILED, ex); --- End diff -- will add a note in the squashed commit
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---