You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/12/08 01:29:29 UTC

[GitHub] [pinot] sajjad-moradi commented on a diff in pull request #9938: Construct new IndexLoadingConfig when loading completed realtime segments

sajjad-moradi commented on code in PR #9938:
URL: https://github.com/apache/pinot/pull/9938#discussion_r1042833356


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java:
##########
@@ -543,9 +544,13 @@ public void replaceLLSegment(String segmentName, IndexLoadingConfig indexLoading
     TableConfig tableConfig = ZKMetadataProvider.getTableConfig(_propertyStore, _tableNameWithType);
     Preconditions.checkState(tableConfig != null, "Failed to get table config for table: {}", _tableNameWithType);
     Schema schema = ZKMetadataProvider.getTableSchema(_propertyStore, tableConfig);
-    indexLoadingConfig.updateTableConfigAndSchema(tableConfig, schema);
+
+    // Construct a new indexLoadingConfig with the updated tableConfig and schema.
+    InstanceDataManagerConfig instanceDataManagerConfig = indexLoadingConfig.getInstanceDataManagerConfig();
+    IndexLoadingConfig newIndexLoadingConfig = new IndexLoadingConfig(instanceDataManagerConfig, tableConfig, schema);
+
     try {
-      addSegment(indexDir, indexLoadingConfig);
+      addSegment(indexDir, newIndexLoadingConfig);

Review Comment:
   Good catch!



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org