Skip to content

Clear broken flag after successful reconnect - #154

Open
chenshi5012 wants to merge 1 commit into
vesoft-inc:masterfrom
chenshi5012:fix/reconnect-clears-broken-flag
Open

chenshi5012 wants to merge 1 commit into
vesoft-inc:masterfrom
chenshi5012:fix/reconnect-clears-broken-flag

Conversation

@chenshi5012

Copy link
Copy Markdown

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number: #150

Description:

When connectionIsBroken_ is set and reconnect retries are enabled, Session::executeWithParameter( ) attempts a preflight reconnect. If the reconnect succeeds, it executes the request and returns without clearing connectionIsBroken_.

As a result, subsequent requests repeatedly enter the reconnect path, causing unnecessary authentication and session ID changes even though the connection has already recovered.

How do you solve it?

Clear connectionIsBroken_ after a successful preflight reconnect and before executing the request. Subsequent requests can then reuse the recovered connection instead of reconnecting and authenticating again.

Special notes for your reviewer, ex. impact of this fix, design document, etc:

  • Added the regression test SessionTest.PreflightReconnectClearsBrokenFlag.
  • The test marks the connection as broken, verifies that a request reconnects successfully and clears the flag, then checks that a subsequent request succeeds without changing the session ID.
  • The focused regression test passed. The full session_test suite also passed against the local Graphd using its default no-authorization configuration.

Fixes #150

@CLAassistant

CLAassistant commented Oct 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chenshi5012
chenshi5012 force-pushed the fix/reconnect-clears-broken-flag branch from 5d44786 to b23c4c6 Compare October 15, 2026 01:41
@chenshi5012

Copy link
Copy Markdown
Author

@xiajingchun @yuhongwei380 Could you please help review this MR when you have time? Any feedback or suggestions are welcome.
#154 #155 #153 #152

This branch has not been deployed

No deployments
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.

[p2-mormal]Successful preflight reconnect leaves connectionIsBroken set and repeats authentication

2 participants