slfan1989 commented on code in PR #8717:
URL: https://github.com/apache/hadoop/pull/8717#discussion_r4091826956
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderServer.java:
##########
@@ -147,10 +147,16 @@ private void join() {
@Override
protected void serviceStop() throws Exception {
- if (readerWebServer != null) {
- readerWebServer.stop();
+ try {
+ if (readerWebServer != null) {
+ readerWebServer.stop();
+ }
+ } finally {
+ // super.serviceStop() is what stops the reader and, with it, the
+ // storage monitor's polling executor. A web server that fails to
+ // stop must not leave those behind.
+ super.serviceStop();
Review Comment:
Could we add a focused regression test where `readerWebServer.stop()` throws,
and verify that the registered child services are still stopped?
The existing HBase test cleanup exercises normal shutdown, but does not
explicitly cover the exceptional path introduced by this `finally` block.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]