activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gaohoward <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1007: ARTEMIS-958 Improve web server tmp dir ...
Date Wed, 15 Feb 2017 01:29:40 GMT
Github user gaohoward commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1007#discussion_r101186821
  
    --- Diff: artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
---
    @@ -145,9 +149,16 @@ public void internalStop() throws Exception {
                    //tmpdir will be removed by deleteOnExit()
                    //somehow when broker is stopped and restarted quickly
                    //this tmpdir won't get deleted sometimes
    -               boolean fileDeleted = TimeUtils.waitOnBoolean(false, 10000, tmpdir::exists);
    +               boolean fileDeleted = TimeUtils.waitOnBoolean(false, 5000, tmpdir::exists);
                    if (!fileDeleted) {
    -                  ActiveMQWebLogger.LOGGER.tmpFileNotDeleted(tmpdir);
    +                  //because the execution order of shutdown hooks are
    +                  //not determined, so it's possible that the deleteOnExit
    +                  //is executed after this hook, in that case we force a delete.
    +                  FileUtil.deleteDirectory(tmpdir);
    +                  logger.debug("Force to delete temporary file on shutdown: " + tmpdir.getAbsolutePath());
    --- End diff --
    
    Got it, thanks.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message