wirybeaver commented on code in PR #15203:
URL: https://github.com/apache/pinot/pull/15203#discussion_r2096603298


##########
pinot-broker/src/main/java/org/apache/pinot/broker/routing/instanceselector/BaseInstanceSelector.java:
##########
@@ -88,6 +93,7 @@ abstract class BaseInstanceSelector implements 
InstanceSelector {
   final ZkHelixPropertyStore<ZNRecord> _propertyStore;
   final BrokerMetrics _brokerMetrics;
   final AdaptiveServerSelector _adaptiveServerSelector;
+  final PriorityGroupInstanceSelector _priorityGroupInstanceSelector;

Review Comment:
   Usually the `@Nullable` is added in the constructor or return function. 
AdaptiveSeverSelector is marked as `@Nullable` in the constructor. Adding 
`@Nullable` on top of the member field for PriorityGroupInstanceSelector looks 
an inconsistent code pattern, which further likely leave the wrong impression 
that the Nullable of PriorityGroupInstanceSelector and AdaptiveSelector is 
independent. 
   For your reference:
   ```
   _priorityGroupInstanceSelector = _adaptiveServerSelector == null ? null : 
new PriorityGroupInstanceSelector(
           _adaptiveServerSelector);
   ```
   
   ```        
   public PriorityGroupInstanceSelector(AdaptiveServerSelector 
adaptiveServerSelector) {
     assert adaptiveServerSelector != null;
     _adaptiveServerSelector = adaptiveServerSelector;
   }
   ```



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

Reply via email to