You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/11/29 18:36:23 UTC

[GitHub] tysonnorris opened a new issue #4146: Incorrect order of message ack message processing

tysonnorris opened a new issue #4146: Incorrect order of message ack message processing
URL: https://github.com/apache/incubator-openwhisk/issues/4146
 
 
   <!--
   We use the issue tracker for bugs and feature requests. For general questions and discussion please use http://slack.openwhisk.org/ or https://openwhisk.apache.org/contact.html instead.
   
   Do NOT share passwords, credentials or other confidential information.
   
   Before creating a new issue, please check if there is one already open that
   fits the defect you are reporting.
   If you open an issue and realize later it is a duplicate of a pre-existing
   open issue, please close yours and add a comment to the other.
   
   Issues can be created for either defects or enhancement requests. If you are a committer than please add the labels "bug" or "feature". If you are not a committer please make clear in the comments which one it is, so that committers can add these labels later.
   
   If you are reporting a defect, please edit the issue description to include the
   information shown below.
   
   If you are reporting an enhancement request, please include information on what you are trying to achieve and why that enhancement would help you.
   
   For more information about reporting issues, see
   https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md#raising-issues
   
   Use the commands below to provide key information from your environment:
   You do not have to include this information if this is a feature request.
   -->
   This may be a duplicate of #4134 
   While experimenting local with disabling activation polling (#4088) I noticed that the first blocking activation at controller received a 202 instead of 200 response. This is because while `ResultMessage` is sent from invoker and received at controller first, the controller executes `processCompletion()` (with the `CompletionMessage`) before executing `processResult()`. 
   
   Subsequent activations are processed in the expected order (`processResult()` then `processCompletion()`) 
   
   ## Environment details:
   
   * Mac OS
   ## Steps to reproduce the issue:
   
   1.   run controller + invoker locally
   2.  send a blocking activation
   3.   
   
   
   ## Provide the expected results and outputs:
   
   Expected logs to indicate in this order:
   ```
   ...
   [ShardingContainerPoolBalancer] received result ack for <activation id>
   ...
   [ShardingContainerPoolBalancer] received completion ack for <activation id>
   ...
   ```
   
   ## Provide the actual results and outputs:
   Actual order for *first* activation at controller is opposite:
   ```
   ...
   [ShardingContainerPoolBalancer] received completion ack for <activation id>
   ...
   [ShardingContainerPoolBalancer] received result ack for <activation id>
   ...
   ```
   ## Additional information you deem important:
   I think this is related to `ShardingContainerPoolBalancer.processAcknowledgement()`, which does:
   
   ```
   Future {
       val raw = new String(bytes, StandardCharsets.UTF_8)
       AcknowledegmentMessage.parse(raw) match {
            <message processing out of order>
       }
   }
   ```
   
   Testing locally, moving the `Future{}` to after the `AcknowledegmentMessage.parse(raw)` fixes the problem.
   

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