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

Properly reconnect after losing mesos master connection #2061

merged 6 commits into from Jan 31, 2020


Copy link

This will fix reconnects in a situation where all masters are temporarily unavailable. Currently if the reconnect ends up throwing a ConnectException in the subscriber thread, that calls onConnectException which, correctly, starts the process over again. However, because this is still synchronously called on the subscriber thread, when the reconnect tries to interrupt that thread, waiting for the join then throws an InterruptedException (because it is called from the same thread being interrupted)

Moving the reconnect to a separate thread should solve this problem. It is currently a single thread, as no more than one of them should be running at a time anyway

@ssalinas ssalinas changed the title Reconnect to mesos on separate thread Properly reconnect after losing mesos master connection Jan 28, 2020
@@ -77,7 +77,7 @@
private Optional<String> mesosUsername = Optional.empty();
private Optional<String> mesosPassword = Optional.empty();

private long reconnectTimeoutMillis = 60000;
private long reconnectTimeoutMillis = 120000;
Copy link
Member Author

Choose a reason for hiding this comment

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

This is lengthened because the attempt time now takes into account the startup period, not just the time from POST -> subscribed event like it did before

@ssalinas ssalinas added the hs_qa label Jan 28, 2020
Copy link


@WH77 WH77 merged commit ac8461a into master Jan 31, 2020
@ssalinas ssalinas added this to the 1.2.0 milestone Feb 3, 2020
@ssalinas ssalinas deleted the master_reconnect branch July 17, 2020 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants