morningman commented on a change in pull request #3267: [Bug] Fix some bugs of 
install/uninstall plugins
URL: https://github.com/apache/incubator-doris/pull/3267#discussion_r405518828
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/plugin/PluginMgr.java
 ##########
 @@ -86,25 +112,26 @@ public PluginInfo installPlugin(InstallPluginStmt stmt) 
throws IOException, User
 
         try {
             PluginInfo info = pluginLoader.getPluginInfo();
-
-            if (plugins[info.getTypeId()].containsKey(info.getName())) {
+            
+            if (checkDynamicPluginNameExist(info.getName())) {
 
 Review comment:
   I think it works. 
   I first using `checkDynamicPluginNameExist` to check if name already exist.
   And after installing, I use `addDynamicPluginNameIfAbsent()` to 
`check-and-add` name to the `dynamicPluginNames` set. `check-and-add` is an 
atomic operation.
   
   And `plugins[]` array is just for saving the plugin, I do not use it to 
check name existence.

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to