arina-ielchiieva commented on a change in pull request #1794: DRILL-7196: Queries are still runnable on disabled plugins URL: https://github.com/apache/drill/pull/1794#discussion_r286352491
########## File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistryImpl.java ########## @@ -133,23 +133,15 @@ public StoragePlugin createOrUpdate(String name, StoragePluginConfig config, boo boolean done = false; try { if (oldPlugin != null) { - if (config.isEnabled()) { - done = enabledPlugins.replace(name, oldPlugin, newPlugin); - } else { - done = enabledPlugins.remove(name, oldPlugin); - } - if (done) { - closePlugin(oldPlugin); - } - } else if (config.isEnabled()) { + done = (newPlugin == null) ? enabledPlugins.remove(name, oldPlugin) : enabledPlugins.replace(name, oldPlugin, newPlugin); Review comment: ```suggestion done = newPlugin == null ? enabledPlugins.remove(name, oldPlugin) : enabledPlugins.replace(name, oldPlugin, newPlugin); ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services