gortiz commented on code in PR #15526:
URL: https://github.com/apache/pinot/pull/15526#discussion_r2084087073


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/forward/ForwardIndexPlugin.java:
##########
@@ -26,10 +26,8 @@
 @AutoService(IndexPlugin.class)
 public class ForwardIndexPlugin implements IndexPlugin<ForwardIndexType> {
 
-  private static final ForwardIndexType INSTANCE = new ForwardIndexType();

Review Comment:
   I don't think that is the correct way to do it. Instead, I would recommend 
either:
   - Using the current system, a fork can set a different IndexService instead 
of using the default. This can easily be done by making IndexService.init() 
public and then calling IndexService.setInstance()
   - Add a priority for each IndexPlugin, so if there is a collision on id, 
IndexService.fromServiceLoader() only loads the one with higher priority.



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