Michael Blow has posted comments on this change. Change subject: [ASTERIXDB-2031][HYR] Kill NC when shutdwon hangs ......................................................................
Patch Set 3: (3 comments) https://asterix-gerrit.ics.uci.edu/#/c/1934/3//COMMIT_MSG Commit Message: PS3, Line 7: shutdwon oops, don't forget to check format of commit messages... https://asterix-gerrit.ics.uci.edu/#/c/1934/2/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java File hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java: PS2, Line 31: 10 * 60 * 1000L not loving this- seems extremely long, also needs to be configurable PS2, Line 44: try { : shutdownHookThread.join(SHUTDOWN_WAIT_TIME); // 10 min : if (shutdownHookThread.isAlive()) { : try { : LOGGER.info("Watchdog is angry. Killing shutdown hook"); : } finally { : Runtime.getRuntime().halt(66); // NOSONAR last resort : } : } : } catch (Throwable th) { // NOSONAR must catch them all : Runtime.getRuntime().halt(77); // NOSONAR last resort : } : }; Can we simplify this by just having a local boolean to control whether or not we halt, in a finally? i.e. try { ... shutdownHookThread.join(SHUTDOWN_WAIT_TIME); sadface = shutdownHookThread.isAlive(); if (sadface) { <log> } } finally { if (sadface) { <halt> } } -- To view, visit https://asterix-gerrit.ics.uci.edu/1934 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9de911f81d6b3723e7cc3674bd80d56df8203c0a 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
