Skip to content

Properly reconnect after losing mesos master connection - #2061

Merged
WH77 merged 6 commits into
masterfrom
master_reconnect
Jan 31, 2020
Merged

WH77 merged 6 commits into
masterfrom
master_reconnect

Conversation

@ssalinas

Copy link
Copy Markdown
Contributor

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
private Optional<String> mesosPassword = Optional.empty();

private long reconnectTimeoutMillis = 60000;
private long reconnectTimeoutMillis = 120000;

Copy link
Copy Markdown
Contributor 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
@pschoenfelder

Copy link
Copy Markdown
Contributor

🚢

@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants