You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/02/20 22:32:31 UTC

[GitHub] jackjlli commented on a change in pull request #3856: Check assigned instances for uploading new segment

jackjlli commented on a change in pull request #3856: Check assigned instances for uploading new segment
URL: https://github.com/apache/incubator-pinot/pull/3856#discussion_r258706046
 
 

 ##########
 File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
 ##########
 @@ -1697,21 +1717,14 @@ private void sendSegmentRefreshMessage(OfflineSegmentZKMetadata segmentZKMetadat
    * @param segmentMetadata Meta-data for the segment, used to access segmentName and tableName.
    */
   // NOTE: method should be thread-safe
-  private void addNewOfflineSegment(SegmentMetadata segmentMetadata) {
+  private void addNewOfflineSegment(SegmentMetadata segmentMetadata, List<String> assignedInstances) {
 
 Review comment:
   Yes, the variable `assignedInstances` can be null, but it can't be **empty**. 
   If it's empty, it's guaranteed that the method `getAssignedInstancesForSegment` gets called but there's no assigned instance. In this case it has been handled in `SegmentValidator` before hitting this part, i.e. throwing an exception in validator.
   If it's null, the caller might be from `PerfBenchmarkDriver`. And it can also be that this is an existing segment, which shouldn't be in Method `addNewOfflineSegment`. So we're good here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org