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
KAFKA-6326: when broker is unavailable, fast revover #4302
base: trunk
Are you sure you want to change the base?
Conversation
leonhong
commented
Dec 7, 2017
- when broker is unavailable(such as broker's machine is down), controller will wait 30 sec timeout by dedault. it seems to be that the timeout waiting is not necessary. It will be increase the MTTR of dead broker .
@hachikuji @ijuma @huxihx ping... |
@@ -76,6 +75,30 @@ public static boolean awaitReady(KafkaClient client, Node node, Time time, long | |||
return client.isReady(node, attemptStartTime); | |||
} | |||
|
|||
public static boolean awaitReady(KafkaClient client, Node node, Time time, long timeoutMs, Boolean fastTimeout) throws IOException { |
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.
why use Boolean instead of primitive ?
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.
@tedyu Boolean 's type is reference?
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.
Seems the fastTimeout
should be thread-safe since it will be accessed by both RequestSendThread and controller event thread. Perhaps volatile
is a least requirement for memory visibility.
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.
I changed the type to boolean here (and on line 89) - compilation passed.
This would avoid unboxing.
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.
In |