saurabhd336 commented on code in PR #11711: URL: https://github.com/apache/pinot/pull/11711#discussion_r1342124565
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentIndexCreationDriverImpl.java: ########## @@ -313,6 +325,36 @@ private void handlePostCreation() buildStarTreeV2IfNecessary(segmentOutputDir); } + Set<IndexType> postSegCreationIndexes = IndexService.getInstance().getAllIndexes().stream() + .filter(indexType -> indexType.getIndexBuildLifecycle() == IndexType.IndexBuildLifecycle.POST_SEGMENT_CREATION) + .collect(Collectors.toSet()); + + if (postSegCreationIndexes.size() > 0) { + // Build other indexes + Map<String, Object> props = new HashMap<>(); + props.put(IndexLoadingConfig.READ_MODE_KEY, ReadMode.mmap); Review Comment: I'd say so.. This method will be called by any component when building a segment (eg by the server when commiting consuming segment, by the minions when building a segment, by spark job when building building and pushing data etc). For example the PinotRecordReader always uses mmap (used by minion jobs to read segment and build new segments out of it) https://github.com/apache/pinot/blob/master/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/readers/PinotSegmentRecordReader.java#L116. Any thoughts on this? I guess a new config can be used to specify the load type. -- 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