Skip to content
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

fail-fast on connection fail #586

Merged
merged 2 commits into from
May 12, 2021
Merged

fail-fast on connection fail #586

merged 2 commits into from
May 12, 2021

Conversation

fengjiachun
Copy link
Contributor

Motivation:

check the connection first and fail-fast (asynchronously to create the connection) on pre-vote and vote

Modification:

Result:

Fixes #583 .

If there is no issue then describe the changes introduced by this PR.

executor.execute(() -> {
if (done != null) {
try {
done.run(new Status(RaftError.EINTERNAL, "Check connection[%s] fail and try to create new one", endpoint));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in line_159 and line_165, the message format way can be unify.
one use string format, another one use string splicing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

@horizonzy horizonzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@killme2008 killme2008 merged commit 4f9f779 into master May 12, 2021
@killme2008 killme2008 deleted the fix_election_timeout branch May 12, 2021 03:41
@fengjiachun fengjiachun mentioned this pull request May 19, 2021
10 tasks
@Excpt0r Excpt0r mentioned this pull request May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sometimes voting ping-pong in leader election
3 participants