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

Fix NPE in cluster client after multiple redirects. #1179

Merged
merged 1 commit into from
May 19, 2021

Conversation

JPWatson
Copy link
Collaborator

Observed this exception during failover testing:

java.lang.NullPointerException
	at io.aeron.cluster.client.AeronCluster$AsyncConnect.awaitPublicationConnected(AeronCluster.java:1600)
	at io.aeron.cluster.client.AeronCluster$AsyncConnect.poll(AeronCluster.java:1529)
        ....

I believe thing can occur in the following scenario:
Step 1 => Step 2 => Step 3 => Redirect (member X) => Step 1 => Step 2 => Step 3 => Redirect (member Y) => Step 1 (Exception!)

This will occur due to the publication for member Y being closed at the point the client is redirected to member X.

@mjpt777 mjpt777 merged commit bd46ab7 into real-logic:master May 19, 2021
@JPWatson JPWatson deleted the cluster-client-npe branch May 19, 2021 11:10
@mjpt777
Copy link
Contributor

mjpt777 commented May 19, 2021

Thanks @JPWatson. Good catch.

mikeb01 pushed a commit to mikeb01/Aeron that referenced this pull request May 20, 2021
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.

2 participants