yujun777 commented on code in PR #44600:
URL: https://github.com/apache/doris/pull/44600#discussion_r1857886107


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -236,10 +236,18 @@ public InternalCatalog() {
         mysqlCompatibleDatabases.add(new MysqlDb());
         MysqlCompatibleDatabase.COUNT = 2;
 
-        for (MysqlCompatibleDatabase idb : mysqlCompatibleDatabases) {
-            // do not call unprotectedCreateDb, because it will cause loop 
recursive when initializing Env singleton
-            idToDb.put(idb.getId(), idb);
-            fullNameToDb.put(idb.getFullName(), idb);
+        if (!tryLock(false)) {

Review Comment:
   in constructor  no need lock because at this time, no other thread can 
access this object yet



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

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to