caiconghui commented on a change in pull request #3775:
URL: https://github.com/apache/incubator-doris/pull/3775#discussion_r531420212



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
##########
@@ -2043,12 +2044,7 @@ public long saveDb(DataOutputStream dos, long checksum) 
throws IOException {
             // Don't write information_schema db meta
             if (!InfoSchemaDb.isInfoSchemaDb(dbName)) {
                 checksum ^= entry.getKey();
-                db.readLock();
-                try {
-                    db.write(dos);
-                } finally {
-                    db.readUnlock();
-                }
+                db.write(dos);

Review comment:
       for Catalog dumpImage or saveImage will call this function. for the 
first, lock all dbs already. for second, only invoke by checkpoint thread, so 
it is thread safe




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



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

Reply via email to