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

 ##########
 File path: fe/src/main/java/org/apache/doris/plugin/PluginMgr.java
 ##########
 @@ -41,17 +43,23 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Set;
 
 public class PluginMgr implements Writable {
     private final static Logger LOG = LogManager.getLogger(PluginMgr.class);
 
+    public final static String BUILTIN_PLUGIN_PREFIX = "__builtin_";
+
     private final Map<String, PluginLoader>[] plugins;
+    // all dynamic plugins should have unique names,
+    private final Set<String> dynamicPluginNames;
 
     public PluginMgr() {
-        plugins = new Map[PluginType.MAX_PLUGIN_SIZE];
-        for (int i = 0; i < PluginType.MAX_PLUGIN_SIZE; i++) {
-            plugins[i] = Maps.newConcurrentMap();
+        plugins = new Map[PluginType.MAX_PLUGIN_TYPE_SIZE];
+        for (int i = 0; i < PluginType.MAX_PLUGIN_TYPE_SIZE; i++) {
+            plugins[i] = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
         }
+        dynamicPluginNames = Sets.newTreeSet(String.CASE_INSENSITIVE_ORDER);
 
 Review comment:
   Maybe you need ConcurrentSkipListSet? I guess

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