himanshug commented on a change in pull request #7066: Support assign tasks to 
run on different tiers of MiddleManagers
URL: https://github.com/apache/incubator-druid/pull/7066#discussion_r285261096
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/discovery/WorkerNodeService.java
 ##########
 @@ -33,16 +33,19 @@
   private final String ip;
   private final int capacity;
   private final String version;
+  private final String tier;
 
   public WorkerNodeService(
       @JsonProperty("ip") String ip,
       @JsonProperty("capacity") int capacity,
-      @JsonProperty("version") String version
+      @JsonProperty("version") String version,
+      @JsonProperty("tier") String tier
   )
   {
     this.ip = ip;
     this.capacity = capacity;
     this.version = version;
+    this.tier = tier;
 
 Review comment:
   Many Druid users follow rolling upgrade (as described in 
http://druid.io/docs/latest/operations/rolling-updates.html ) . If you only 
upgrade overlord  then, at overlord, tier is going to be null which would lead 
to a NPE in `WorkerSelectUtils.getTierWorkers(..)` at line 
"Maps.filterValues(workerMap, workerInfo -> 
workerInfo.getWorker().getTier().equals(tier))" and maybe in some other places 
as well.
    that should probably be fixed or something needs to go in release nodes 
along the lines of making sure that new tier based strategies are only to be 
used when there has been at least one restart of overlord after all 
middleManager upgrade (due to second cluster upgrade or forced restart of 
overlord after MM upgrade or whatever)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to