J-HowHuang commented on code in PR #18920:
URL: https://github.com/apache/pinot/pull/18920#discussion_r3788080151


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/invertedindex/JsonIndexHandler.java:
##########
@@ -90,19 +127,64 @@ public void updateIndices(SegmentDirectory.Writer 
segmentWriter)
     String segmentName = _segmentDirectory.getSegmentMetadata().getName();
     Set<String> columnsToAddIdx = new HashSet<>(_jsonIndexConfigs.keySet());
     Set<String> existingColumns = 
segmentWriter.toSegmentDirectory().getColumnsWithIndex(StandardIndexes.json());
+    // Load metadata properties once; track whether we need to save changes.
+    PropertiesConfiguration properties = loadMetadataProperties();

Review Comment:
   @Akanksha-kedia My other concern here is the additional disk I/O we're 
making here. Can you do a performance comparison on `needReload` API on a table 
and see how much overhead this PR could introduce? As this is gonna be disk 
read per segment.
   
   Otherwise it might be a better idea to load the per-index info you're 
interested while constructing `SegmentMetadata`



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