[jira] [Created] (CXF-7940) FileUtils.delete dramatically slowdown WildFly server shutdown

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Created] (CXF-7940) FileUtils.delete dramatically slowdown WildFly server shutdown

JIRA jira@apache.org
Viacheslav created CXF-7940:

             Summary: FileUtils.delete dramatically slowdown WildFly server shutdown
                 Key: CXF-7940
                 URL: https://issues.apache.org/jira/browse/CXF-7940
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 3.0.0-milestone1, 3.3.0
         Environment: *OS*: Windows
*AppServer*: WildFly
*CXF*: cxf-core-3.1.6
*jbossws-cxf*: jbossws-cxf-server-5.1.5.Final.jar
            Reporter: Viacheslav

*Brief introduction:*
We use WildFly server.
As we know, WildFly based on JBoss Application Server.
WildFly have an integration with Apache CXF through "[jbossws-cxf|https://github.com/jbossws/jbossws-cxf]" project.

When WildFly server is stops we see repeated invokes of WSDLFilePublisher.java#unpublishWsdlFiles that invoke FileUtils#removeDir

*Cause of problems:*
When the method FileUtils#removeDir is invoked then we see the invoke of FileUtils#delete:

We see some strange code:
public static void delete(File f, boolean inShutdown) {
        if (!f.delete()) {
            if (isWindows()) {
This leads to dramatically slowdown of WildFly server shutdown on Windows systems.
For example, our WildFly server stops in 2781ms without this call AND stops in 119882ms with this call (~ 43 times slower).

What is the reason of this code?
Is it bug? What are the disadvantages of removing this code?

Last changes of this code from Git Blame: [commit|https://github.com/apache/cxf/commit/88a9451b92180609b7bb93d0314bc8384f0c24a4#diff-b620deea897fb467b6f42abd1c32b7f2R138].

This message was sent by Atlassian JIRA