weizhengte commented on code in PR #13303: URL: https://github.com/apache/doris/pull/13303#discussion_r993143111
########## fe/fe-core/src/main/java/org/apache/doris/statistics/Statistics.java: ########## @@ -159,6 +164,26 @@ public void updateColumnStats(long tableId, String partitionName, String columnN } } + public void dropTableStats(long tableId) { + dropPartitionStats(tableId, null); + } + + public void dropPartitionStats(long tableId, String partitionName) { Review Comment: > you can simply add synchronized modifier to this method, since whole code in it is in the synced block It is true that all delete operations are performed here, but idToTableStats may be updated by the method of updating statistics. > Besides, I think the ` if (idToTableStats.containsKey(tableId))` is a bit redundant, since you will use the value anyway in the inner block It's okay to remove it here, but it needs to be judged again in `idToTableStats.get(tableId)`. -- 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