q763562998 commented on code in PR #17884:
URL: https://github.com/apache/doris/pull/17884#discussion_r1147061087


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/CatalogMgr.java:
##########
@@ -465,6 +470,20 @@ public CatalogIf replayCreateCatalog(CatalogLog log) 
throws DdlException {
         writeLock();
         try {
             CatalogIf catalog = CatalogFactory.constructorFromLog(log);
+            Map<String, String> props = log.getProps();
+            if (props.containsKey(METADATA_REFRESH_INTERVAL_SEC)) {
+                // need refresh
+                String catalogName = log.getCatalogName();
+                Integer metadataRefreshIntervalSec = null;
+                try {
+                    metadataRefreshIntervalSec = 
Integer.valueOf(props.get(METADATA_REFRESH_INTERVAL_SEC));
+                } catch (NumberFormatException e) {
+                    throw new DdlException("Invalid properties: " + 
METADATA_REFRESH_INTERVAL_SEC);
+                }
+                Integer[] sec = {metadataRefreshIntervalSec, 
metadataRefreshIntervalSec};
+                
Env.getCurrentEnv().getRefreshManager().getRefreshMap().put(catalogName, sec);

Review Comment:
   Ok ,I will modify the above code and encapsulation 
`getRefreshMap().put(catalogName, sec)` into `RefreshManger()`



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