tysonnorris commented on a change in pull request #4951:
URL: https://github.com/apache/openwhisk/pull/4951#discussion_r486749255



##########
File path: 
common/scala/src/main/scala/org/apache/openwhisk/common/NestedSemaphore.scala
##########
@@ -100,14 +100,19 @@ class NestedSemaphore[T](memoryPermits: Int) extends 
ForcibleSemaphore(memoryPer
     if (maxConcurrent == 1) {
       super.release(memoryPermits)
     } else {
-      val concurrentSlots = actionConcurrentSlotsMap(actionid)
-      val (memoryRelease, actionRelease) = concurrentSlots.release(1, true)
-      //concurrent slots
-      if (memoryRelease) {
-        super.release(memoryPermits)
-      }
-      if (actionRelease) {
-        actionConcurrentSlotsMap.remove(actionid)
+      //This map may be recreated (multiple times) due to cluster membership 
events, so don't assume the entry exists...
+      actionConcurrentSlotsMap.get(actionid) match {

Review comment:
       The stack trace is added to logging here for the catastrophic case where 
message consumer processing fails - previously there is just a stack trace 
added without indicating it was part of message processing etc. This is 
slightly better, I think, since it provides an ERROR log, and also associates 
it with message consumption.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to