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(java-client): fix Negotiation failed after a session with authentication enabled is closed #2132

Merged
merged 10 commits into from
Oct 24, 2024

Conversation

empiredan
Copy link
Contributor

@empiredan empiredan commented Oct 16, 2024

Resolve #2133.

After the session with authentication enabled to remote server is closed(e.g.
the server is killed), the flag(i.e. authSucceed) marking whether the session
has been authenticated is still kept true. Afterwards, while trying to creating
another new connection to the same remote server for this session, some requests
would be pending before it is connected successfully. Once the session is connected,
the pending requests would be sent to the remote server. Typically, the first element
of the pending queue would be a non-negotiation request(query_cfg_request to
the meta server for example), and the second one would be a negotiation request.
Normally, the non-negotiation request would be moved to another pending queue
for authentication; however, since the flag still marks that the session has been
authenticated successfully, the non-negotiation request would be directed to the
remote server which would never reply to the client since the server think that the
negotiation has not been launched. However, since the client has actually launched
the negotiation, it would close the session due to timeout or having not receiving
response from the server for long time. Therefore, the above process would repeat
again.

To fix this problem, the flag should be reset after the session is closed. Then, the
client would never send non-negotiation requests before the negotiation with the
server becomes successful.

@empiredan empiredan changed the title fix(java-client): fix Negotiation failed after session is disconnected fix(java-client): fix Negotiation failed after a session with authentication is disconnected Oct 17, 2024
@empiredan empiredan changed the title fix(java-client): fix Negotiation failed after a session with authentication is disconnected fix(java-client): fix Negotiation failed after a session with authentication enabled is disconnected Oct 17, 2024
@empiredan empiredan force-pushed the fix-java-client-auth-after-close branch from 4d9b629 to 53d2e6d Compare October 21, 2024 09:13
@empiredan empiredan marked this pull request as ready for review October 23, 2024 09:20
@empiredan empiredan changed the title fix(java-client): fix Negotiation failed after a session with authentication enabled is disconnected fix(java-client): fix Negotiation failed after a session with authentication enabled is closed Oct 23, 2024
@empiredan empiredan merged commit f13084a into apache:master Oct 24, 2024
33 checks passed
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.

Negotiation failed java client after pegasus servers with authentication enabled were restarted
3 participants