caiconghui commented on a change in pull request #3775: URL: https://github.com/apache/incubator-doris/pull/3775#discussion_r536082788
########## File path: fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java ########## @@ -265,17 +265,16 @@ private void executeDynamicPartition() { String tableName; boolean skipAddPartition = false; OlapTable olapTable; - db.readLock(); + olapTable = (OlapTable) db.getTable(tableId); Review comment: because when drop table, we need to prevent that other thread drop table or create table too. but for get table, we just need to ensure that the get table operation is thread safe, and the final result is ok, we don't purse the strict consistency here for better performance. ########## File path: fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java ########## @@ -265,17 +265,16 @@ private void executeDynamicPartition() { String tableName; boolean skipAddPartition = false; OlapTable olapTable; - db.readLock(); + olapTable = (OlapTable) db.getTable(tableId); Review comment: @wangbo because when drop table, we need to prevent that other thread drop table or create table too. but for get table, we just need to ensure that the get table operation is thread safe, and the final result is ok, we don't purse the strict consistency here for better performance. ---------------------------------------------------------------- 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