Jackie-Jiang commented on code in PR #9982: URL: https://github.com/apache/pinot/pull/9982#discussion_r1049011520
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/BaseIndexHandler.java: ########## @@ -41,14 +43,19 @@ 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) { + // The segmentMetadata may need to be updated after creating the forward index + protected SegmentMetadata _segmentMetadata; + + public BaseIndexHandler(SegmentMetadata segmentMetadata, IndexLoadingConfig indexLoadingConfig, Review Comment: If we pass in `SegmentDirectory`, we don't need to pass in `SegmentMetadata` because it can be read from `SegmentDirectory`, and we don't want to keep 2 copies of it. When we need to reload the segment metadata, we can call `SegmentDirectory.reloadMetadata()`, then get the updated `SegmentMetadata` with `SegmentDirectory.getSegmentMetadata()` -- 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