-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created a better thread safety test and fixed a couple thread safety issues #395
base: master
Are you sure you want to change the base?
Conversation
* Updated the class loader tests to show the errors * Updated ZipFileSystem and TarFileSystem with threadlocal files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 failed build and:
Quick note but the PR would need a detailed review from more folks: I am really skeptical here, VFS was not designed for thread safety; hacking some code here and there is more likely to make the code base much harder to understand and maintain. In the past, we've just told users they have to handle thread safety in their applications. Slapping "synchronized" here and there is likely to create side effects like dead-locks in existing applications. While we've that've made some changes in the past to help with thread safety (see the mailing list, jira, and PRs), doing that consistently is delicate and I am concerned about unintended side effects.
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/VfsClassLoaderTests.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/VfsClassLoaderTests.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/VfsClassLoaderTests.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileSystem.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/test/java/org/apache/commons/vfs2/impl/VfsClassLoaderTests.java
Show resolved
Hide resolved
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileSystem.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileSystem.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
Outdated
Show resolved
Hide resolved
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/tar/TarFileSystem.java
Outdated
Show resolved
Hide resolved
* Updated test suite mechanism to allow exclusing test classes * Skip threaded tests for http4 and ftps mechanisms
Well, given how many of the test cases are showing non-thread safety (as has been stated previously), I am going to change this to only test for thread safety where it is needed wrt the VFSClassLoader (e.g. jar/zip) |
The only build failure is on mac OS 8 and the error does not appear to have anything to do with my changes. I understand the not designed for thread safety issues, however if you are going to supply a class loader implementation, then the underlying protocols being used will have to be thread safe. |
No description provided.