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/15 16:19:00 UTC

[GitHub] cbickel opened a new pull request #4115: Don't react on Completion message of blocking requests.

cbickel opened a new pull request #4115: Don't react on Completion message of blocking requests.
URL: https://github.com/apache/incubator-openwhisk/pull/4115
 
 
   <!--- Provide a concise summary of your changes in the Title -->
   
   ## Description
   On invoking an action blocking, a ResultMessage and afterwards a CompletionMessage will be sent from the invoker to the controller. The CompletionMessage is always very small. The ResultMessage could be large, which means, that it takes longer to transfer it to Kafka. If log collection is fast, the CompletionMessage could arrive in the controller first.
   The result of this is, that the CompletionMessage will close the Promise with only the activation id, which makes the controller search the activation result in database. Hence the ResultMessage will arrive a few milliseconds later, the controller will need much more network-bandwidth and memory than needed.
   
   This PR will fix the handling in the Loadbalancer, to not close the promise on receiving the CompletionMessage if the request was blocking. Because it will be closed on getting the ResultMessage. If the ResultMessage really gets lost, we still have the fallback to poll the database and we are not worse compared to two weeks ago.
   
   Long term it definetly makes sense, to ensure, that our Kafka-producer, will really behave like a FIFO-queue, but I think there could be always some conditions, where the CompletionMessage arrives first. So the Loadbalancer needs to handle that anyway.
   
   ## Related issue and scope
   <!--- Please include a link to a related issue if there is one. -->
   - [ ] I opened an issue to propose and discuss this change (#????)
   
   ## My changes affect the following components
   <!--- Select below all system components are affected by your change. -->
   <!--- Enter an `x` in all applicable boxes. -->
   - [ ] API
   - [ ] Controller
   - [ ] Message Bus (e.g., Kafka)
   - [x] Loadbalancer
   - [ ] Invoker
   - [ ] Intrinsic actions (e.g., sequences, conductors)
   - [ ] Data stores (e.g., CouchDB)
   - [ ] Tests
   - [ ] Deployment
   - [ ] CLI
   - [ ] General tooling
   - [ ] Documentation
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
   - [x] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] Enhancement or new feature (adds new functionality).
   - [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
   
   ## Checklist:
   <!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
   
   - [x] I signed an [Apache CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
   - [x] I reviewed the [style guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :).
   - [ ] I added tests to cover my changes.
   - [ ] My changes require further changes to the documentation.
   - [ ] I updated the documentation where necessary.

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