Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2762#discussion_r202341617
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/messaging/netty/StormClientHandler.java 
---
    @@ -47,12 +47,20 @@ public void channelRead(ChannelHandlerContext ctx, 
Object message) throws Except
                 BackPressureStatus status = (BackPressureStatus) message;
                 if (status.bpTasks != null) {
                     for (Integer bpTask : status.bpTasks) {
    -                    remoteBpStatus[bpTask].set(true);
    +                    try {
    +                        remoteBpStatus[bpTask].set(true);
    +                    } catch (ArrayIndexOutOfBoundsException e) {
    --- End diff --
    
    So there are two issues happening in the jira.  Previously when under heavy 
load a backpressure messsage would be sent.  Under the old code this might 
contain a -1 which would cause an ArrayIndexOutOFBoundsException to happen.  
When it did some backpressure status updates in the message might be lost 
(specifically the ones that turn off backpressure) and the topology would stop 
processing.  I fixed the cause of the -1 indexes, but I thought it would be 
best to also guard against future problems and if there is one we can process 
the rest of the status updates.


---

Reply via email to