somandal commented on code in PR #9740:
URL: https://github.com/apache/pinot/pull/9740#discussion_r1015901074
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/SegmentPreProcessor.java:
##########
@@ -103,20 +104,27 @@ public void process()
// Update single-column indices, like inverted index, json index etc.
IndexCreatorProvider indexCreatorProvider =
IndexingOverrides.getIndexCreatorProvider();
+ List<IndexHandler> indexHandlers = new ArrayList<>();
Review Comment:
The `handler` objects are created inside the `for` loop which means once we
come outside of the loop, the original objects won't be accessible anymore. I
only want to run the cleanup after all `IndexHandlers` have completed which
means i need access to the original `handler` objects outside the `for` loop.
Since the original objects store the list to track the columns for which
cleanup is needed, the only way to get access to the original list is to keep
the original object.
```
IndexHandler handler =
IndexHandlerFactory.getIndexHandler(type, _segmentMetadata,
_indexLoadingConfig, _schema);
```
And inside the above:
```
case FORWARD_INDEX:
return new ForwardIndexHandler(segmentMetadata, indexLoadingConfig,
schema);
```
Hope this makes sense. Let me know if I maybe misunderstood your question.
--
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]