vmware / vmware/singleton

[BUG] Java client library - "FileSystems.newFilesystem is not thread safe

Open
#910 0 comments 0 reactions 3 assignees View on GitHub

Nobody has claimed this yet.

area/java-client kind/bug priority/medium
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:

  1. Makes sure that the list of supported locales is not yet in cache, and online mode is NOT supported.
  2. Have multiple threads (like 100) trigger ProductService.getSupportedLoclaes
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.