arina-ielchiieva commented on a change in pull request #2010: DRILL-7620: Fix
plugin mutability issues
URL: https://github.com/apache/drill/pull/2010#discussion_r387643594
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginMap.java
##########
@@ -222,7 +222,9 @@ public synchronized PluginHandle remove(String name,
StoragePluginConfig oldConf
.build(logger);
}
nameMap.remove(oldEntry.name());
- configMap.remove(oldEntry.config());
+ if (configMap.remove(oldEntry.config()) != oldEntry) {
+ throw new IllegalStateException("Config entry was modified while in the
plugin cache");
Review comment:
Please add at least plugin name to make exception more informative.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services