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/10/23 22:53:22 UTC

[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request #4739: Fix state change when consumption is stopped

mcvsubbu commented on a change in pull request #4739: Fix state change when consumption is stopped
URL: https://github.com/apache/incubator-pinot/pull/4739#discussion_r338315193
 
 

 ##########
 File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java
 ##########
 @@ -603,9 +603,15 @@ public void segmentStoppedConsuming(LLCSegmentName llcSegmentName, String instan
     try {
       HelixHelper.updateIdealState(_helixManager, realtimeTableName, idealState -> {
         assert idealState != null;
-        idealState.getInstanceStateMap(segmentName).put(instanceName, RealtimeSegmentOnlineOfflineStateModel.OFFLINE);
+        Map<String, String> stateMap = idealState.getInstanceStateMap(segmentName);
+        if (stateMap != null) {
 
 Review comment:
   Agreed, the statemap can be null only when the segment has somehow been removed from the table (a bug elsewhere). I can log something to that effect.
   We should always return "DONE" to the server, otherwise the server may retry the operation, to no effect. So, no point throwing exceptions here, if that is what you mean

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