-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add defensive code for dealing with loadbalancer concurrency tracking #4951
base: master
Are you sure you want to change the base?
add defensive code for dealing with loadbalancer concurrency tracking #4951
Conversation
{ | ||
case Failure(e) => | ||
logging.error(this, s"Failed to process message for topic $topic : $e (stack trace included)") | ||
e.printStackTrace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
printing the stack this way excludes it from the logger formatting - is that intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not intentional - can you refer me to an example of better formatting for stack trace?
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it already part of the log line above anyway? I guess the broader question is: Why is the stack trace even needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it is, and I forgot to remove the e.printStackTrace()
when I changed the log line to include it... 😔 fixing that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one, direct map access is probably always bad 😅
{ | ||
case Failure(e) => | ||
logging.error(this, s"Failed to process message for topic $topic : $e (stack trace included)") | ||
e.printStackTrace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it already part of the log line above anyway? I guess the broader question is: Why is the stack trace even needed here?
common/scala/src/main/scala/org/apache/openwhisk/common/NestedSemaphore.scala
Outdated
Show resolved
Hide resolved
… events cause maps to reset
…Semaphore.scala Co-authored-by: Markus Thömmes <[email protected]>
06a4c6f
to
61ac430
Compare
@@ -213,7 +214,13 @@ class MessageFeed(description: String, | |||
outstandingMessages = outstandingMessages.tail | |||
|
|||
if (logHandoff) logging.debug(this, s"processing $topic[$partition][$offset] ($occupancy/$handlerCapacity)") | |||
handler(bytes) | |||
handler(bytes).andThen { | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the inner braces needed?
Defensive code for concurrency tracking in sharding loadbalancer.
Description
We saw some cases where controller ack processing was incomplete for some activations, which turned out to be:
This PR does 2 things:
This was not caught in tests due to the multi-controller cluster state changes, plus concurrency, required to reproduce the symptom.
Related issue and scope
My changes affect the following components
Types of changes
Checklist: