Jackie-Jiang commented on code in PR #9982: URL: https://github.com/apache/pinot/pull/9982#discussion_r1066443852
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/BaseIndexHandler.java: ########## @@ -41,13 +41,17 @@ public abstract class BaseIndexHandler implements IndexHandler { private static final Logger LOGGER = LoggerFactory.getLogger(BaseIndexHandler.class); - protected final SegmentMetadata _segmentMetadata; protected final IndexLoadingConfig _indexLoadingConfig; protected final Set<String> _tmpForwardIndexColumns; + protected final SegmentDirectory _segmentDirectory; - public BaseIndexHandler(SegmentMetadata segmentMetadata, IndexLoadingConfig indexLoadingConfig) { - _segmentMetadata = segmentMetadata; + // The segmentMetadata may need to be updated after creating the forward index + protected SegmentMetadata _segmentMetadata; Review Comment: Since this can be modified during the index handling, should we not put it as a member variable, but always read it from the `_segmentDirectory`? The one inside `_segmentDirectory` should always be updated -- 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...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org