cbickel opened a new pull request #3451: Fix several loadbalancer bugs.
URL: https://github.com/apache/incubator-openwhisk/pull/3451
 
 
   1. `padTo` (used when generating the list of semaphores for all invokers) 
does not recompute the value each time it adds an element to the underlying 
list. That resulted in **all** invokers-state being backed by the same 
Semaphore and thus not doing anything properly really.
   2. The stepsizes need to be calculated for the list of invokers they are 
used to step to. Therefore we need a seperate list of step-sizes for the 
managed and the blackbox invoker list.
   3. The assumption should be, that we freed our resources (and thus updated 
the state) **before** we return the request to the user. A minor change in code 
order is warranted here.
   4. In the overload case we need to take the index we want to schedule to out 
of the `healthyInvokers` list, rather than using the `random` value directly. 
The `healthyInvokers` list might be shorter/in a different order than the list 
of all underlying invokers.
   
   Furthermore, this adds a useful metric to determine (from the loadbalancers 
point-of-view) how many activations are currently running in the system. That 
can be used to determine overall system utilization.
   
   Co-authored-by: Markus Thömmes <[email protected]>
   
   ## Related issue and scope
   - [ ] I opened an issue to propose and discuss this change (#????)
   
   ## My changes affect the following components
   - [ ] API
   - [X] 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 :).
   - [X] 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:
[email protected]


With regards,
Apache Git Services

Reply via email to