You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ferencerdei (via GitHub)" <gi...@apache.org> on 2023/06/29 07:29:28 UTC

[GitHub] [nifi] ferencerdei commented on a diff in pull request #7448: NIFI-11761 Fixed MiNiFi restart issue when graceful shutdown period expires. MiNiFi restart sends bootstrap to background

ferencerdei commented on code in PR #7448:
URL: https://github.com/apache/nifi/pull/7448#discussion_r1246230431


##########
minifi/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/command/StopRunner.java:
##########
@@ -112,6 +114,19 @@ private void gracefulShutDownMiNiFiProcess(long minifiPid) throws IOException {
         if (minifiPid != UNINITIALIZED) {
             processUtils.shutdownProcess(minifiPid, "MiNiFi has not finished shutting down after {} seconds. Killing process.",
                 gracefulShutdownParameterProvider.getGracefulShutdownSeconds());
+            int maxRetry = 5;
+            while (processUtils.isProcessRunning(minifiPid)) {

Review Comment:
   What do you think about putting this into the processUtils' killProcessTree method? it is called from multiple places (from the stopRunner directly, and from the shutdownProcess method as well)



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org