Skip to content

Commit 06a4c6f

Browse files
committed
cleanup
1 parent 1966d31 commit 06a4c6f

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

common/scala/src/main/scala/org/apache/openwhisk/common/NestedSemaphore.scala

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,16 @@ class NestedSemaphore[T](memoryPermits: Int) extends ForcibleSemaphore(memoryPer
101101
super.release(memoryPermits)
102102
} else {
103103
//This map may be recreated (multiple times) due to cluster membership events, so don't assume the entry exists...
104+
//(this case can occur if one or more cluster members is restarted, resetting the state of the outstanding activations)
104105
actionConcurrentSlotsMap.get(actionid).foreach { concurrentSlots =>
105-
case Some(concurrentSlots) =>
106-
val (memoryRelease, actionRelease) = concurrentSlots.release(1, true)
107-
//concurrent slots
108-
if (memoryRelease) {
109-
super.release(memoryPermits)
110-
}
111-
if (actionRelease) {
112-
actionConcurrentSlotsMap.remove(actionid)
113-
}
114-
case None =>
115-
//this case can occur if one or more cluster members is restarted, resetting the state of the outstanding activations
106+
val (memoryRelease, actionRelease) = concurrentSlots.release(1, true)
107+
//concurrent slots
108+
if (memoryRelease) {
109+
super.release(memoryPermits)
110+
}
111+
if (actionRelease) {
112+
actionConcurrentSlotsMap.remove(actionid)
113+
}
116114
}
117115
}
118116
}

common/scala/src/main/scala/org/apache/openwhisk/core/connector/MessageConsumer.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ class MessageFeed(description: String,
219219
case Failure(e) =>
220220
val stacktrace = ExceptionUtils.getStackTrace(e)
221221
logging.error(this, s"Failed to process message for topic $topic : $e : stacktrace: $stacktrace")
222-
e.printStackTrace()
223222
}
224223
}
225224
handlerCapacity -= 1

0 commit comments

Comments
 (0)