vvraskin commented on a change in pull request #2960: Reduce the number of logs
on info level
URL:
https://github.com/apache/incubator-openwhisk/pull/2960#discussion_r151360972
##########
File path:
core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala
##########
@@ -303,15 +303,17 @@ protected[core] abstract class
EntitlementProvider(config: WhiskConfig, loadBala
private def checkConcurrentUserThrottle(user: Identity, right: Privilege,
resources: Set[Resource])(
implicit transid: TransactionId): Future[Unit] = {
if (right == ACTIVATE && resources.exists(_.collection.path ==
Collection.ACTIONS)) {
- checkThrottleOverload(concurrentInvokeThrottler.check(user))
+ checkThrottleOverload(concurrentInvokeThrottler.check(user), user)
Review comment:
What you propose is a valid option, however I'd like to leave it as it is to
avoid duplicating the log entries. Since we call `checkThrottleOverload` at
three places I think that would be better to keep the log entry inside of the
method. You could argue that we can create three different log messages for
each type of user throttle, but since the message on the debug level, I don't
believe that would bring extra value. Passing user as a parameter should not
add much overhead, right?
----------------------------------------------------------------
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