morningman commented on code in PR #17884: URL: https://github.com/apache/doris/pull/17884#discussion_r1141352733
########## fe/fe-core/src/main/java/org/apache/doris/PaloFe.java: ########## @@ -173,6 +176,12 @@ public static void start(String dorisHomeDir, String pidDir, String[] args, Star qeService.start(); } + ScheduledThreadPoolExecutor refreshTimer = ThreadPoolManager.newDaemonScheduledThreadPool(1, + "refresh-timer-pool", true); + Integer refreshTime = 20; Review Comment: What does `20` mean? It is a magic number to me ########## fe/fe-core/src/main/java/org/apache/doris/PaloFe.java: ########## @@ -173,6 +176,12 @@ public static void start(String dorisHomeDir, String pidDir, String[] args, Star qeService.start(); } + ScheduledThreadPoolExecutor refreshTimer = ThreadPoolManager.newDaemonScheduledThreadPool(1, Review Comment: This `ScheduledThreadPoolExecutor` should be in `RefreshMgr`. And there is already a `CatalogMgr` is `Env.java`, why new a `CatalogMgr` here? Currently, there are 2 main manager: - RefreshMgr - CatalogMgr All refresh method(refresh catalog/db/table/partition) should be in RefreshMgr. But currently, there is a mistake that "refresh catalog method" is in CatalogMgr. I think you can do a refactor to move the "refresh catalog method" from CatalogMgr to RefreshMgr. And this newly added refresh timer thread should be in RefreshMgr too. ########## fe/fe-core/src/main/java/org/apache/doris/PaloFe.java: ########## @@ -173,6 +176,12 @@ public static void start(String dorisHomeDir, String pidDir, String[] args, Star qeService.start(); } + ScheduledThreadPoolExecutor refreshTimer = ThreadPoolManager.newDaemonScheduledThreadPool(1, Review Comment: Please change your IDEA formatter to only format the code you modified. Not changing other code line. ########## fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java: ########## @@ -88,17 +91,25 @@ public class CatalogMgr implements Writable, GsonPostProcessable { private final Map<Long, CatalogIf> idToCatalog = Maps.newConcurrentMap(); // this map will be regenerated from idToCatalog, so not need to persist. private final Map<String, CatalogIf> nameToCatalog = Maps.newConcurrentMap(); + + private static final Map<String, Integer[]> refreshMap = Maps.newConcurrentMap(); Review Comment: Add some comment in code to explain the key value in refreshMap -- 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