Jackie-Jiang commented on code in PR #19571:
URL: https://github.com/apache/pinot/pull/19571#discussion_r4074149254


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -437,13 +437,27 @@ public IndexLoadingConfig fetchIndexLoadingConfig() {
     return indexLoadingConfig;
   }
 
+  /// Builds a per-segment loading config from the cached table config and 
schema without fetching them from ZK.
+  /// Explicit reloads and config/schema refresh messages still use 
[#fetchIndexLoadingConfig()].
+  protected IndexLoadingConfig getIndexLoadingConfig() {
+    Pair<TableConfig, Schema> cached = _cachedTableConfigAndSchema;
+    IndexLoadingConfig indexLoadingConfig =
+        new IndexLoadingConfig(_instanceDataManagerConfig, cached.getLeft(), 
cached.getRight());

Review Comment:
   This step is quite expensive. Can we just cache the `IndexLoadingConfig` to 
avoid the re-processing every time?
   
   To make it more clear, suggest changing the name to 
`getCachedIndexLoadingConfig()`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to