[BUG] Java client library - "FileSystems.newFilesystem is not thread safe
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 72
- Forks
- 69
- Avg merge
- 23h 32m
- Merged PRs (30d)
- 4
Description
Describe the bug
"FileSystems.newFilesystem is not thread safe so we want only 1 thread to be able to do it at a time. FileSystemAlreadyExistsException exception is thrown if another thread is simultaneously accessing the file system, making the current thread fail.
To Reproduce
Steps to reproduce the behavior:
- Makes sure that the list of supported locales is not yet in cache, and online mode is NOT supported.
- Have multiple threads (like 100) trigger ProductService.getSupportedLoclaes
- Notice FileSystemAlreadyExistsException is thrown for some of the threads.
Expected behavior
We do not want the current thread to fail. Instead, we want it to wait for the other thread to finish so it could access the file system properly. To test this, have multiple threads try to access the file system (e.g. 100 calls that will get the list of supported locales at the same time.)"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.