abdullah alamoudi has posted comments on this change. Change subject: [NO ISSUE][RT] Make start and cancel job uninterruptible ......................................................................
Patch Set 3: (5 comments) https://asterix-gerrit.ics.uci.edu/#/c/2639/3/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/HyracksConnection.java File hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/client/HyracksConnection.java: PS3, Line 84: private volatile long reqId = 0L; > insert blank line to maintain convention Done PS3, Line 122: InvokeUtil.doUninterruptibly(() -> uninterruptibles.put(request)); : InvokeUtil.doUninterruptibly(request); > refactor and use in all of them Done PS3, Line 162: uninterruptibles.put(request); : InvokeUtil.doUninterruptibly(request); > replace by refactored method Done PS3, Line 266: uninterruptibles.put(request); : InvokeUtil.doUninterruptibly(request); > replace by refactored method Done PS3, Line 422: public class UninterrubtileHandlerWatcher implements Runnable { : @Override : @SuppressWarnings({ "squid:S2189", "squid:S2142" }) : public void run() { : long currentReqId = 0L; : long currentTime = System.nanoTime(); : while (true) { : try { : TimeUnit.MINUTES.sleep(1); : } catch (InterruptedException e) { : LOGGER.log(Level.WARN, "Ignoring interrupt. This thread should never be interrupted."); : continue; : } : if (running) { : if (reqId == currentReqId) { : if (TimeUnit.NANOSECONDS.toMinutes(System.nanoTime() - currentTime) > 0) { : ExitUtil.halt(ExitUtil.EC_FAILED_TO_PROCESS_UN_INTERRUPTIBLE_REQUEST); : } : } else { : currentReqId = reqId; : currentTime = System.nanoTime(); : } : } : } : } : } > why is this needed? If a request is stuck for whatever reason... then there is no getting out of that state. No other uninterruptible request will be processed. Seemed like the right thing to do -- To view, visit https://asterix-gerrit.ics.uci.edu/2639 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I27b2aaae902b19829bd2df2ae04c5e704f5ca8e8 Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]> Gerrit-HasComments: Yes
