-
Notifications
You must be signed in to change notification settings - Fork 32
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
CloudStorageFileSystem: ConcurrentModificationException belies thread safety #691
Comments
Line 154 in 7f6f65d
private static CloudStorageFileSystemProvider getCloudStorageFileSystemProvider(
CloudStorageConfiguration config, StorageOptions storageOptions) {
CloudStorageFileSystemProvider newProvider =
(storageOptions == null)
? new CloudStorageFileSystemProvider(config.userProject())
: new CloudStorageFileSystemProvider(config.userProject(), storageOptions);
Set<CloudStorageFileSystemProvider> existingProviders = CONFIG_TO_PROVIDERS_MAP.get(config);
if (existingProviders == null) {
existingProviders = new HashSet<>();
} else {
for (CloudStorageFileSystemProvider existiningProvider : existingProviders) {
if (existiningProvider.equals(newProvider)) {
return existiningProvider;
}
}
}
existingProviders.add(newProvider);
CONFIG_TO_PROVIDERS_MAP.put(config, existingProviders);
return newProvider;
}
|
Thanks for the feedback, we're taking a look at this. How often does this issue come up for you? |
The issue reproduces more or less continuously when our multitenant server app is in production with the affected release. We also created a unit test that triggers it in a minimal scenario. |
Thanks! We'll have an update on this tomorrow |
Sounds great, thank you! |
Excellent, thank you very much! Appreciate the fast turnaround. |
We recently updated from an older version of the storage NIO library and are now seeing
ConcurrentModificationExceptions
fromCloudStorageFileSystem
. At a guess, it seems like this function is perhaps not perfectly resilient ifCONFIG_TO_PROVIDERS_MAP
is updated while theexistingProviders
value is being iterated over?The text was updated successfully, but these errors were encountered: