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 session error #124

Merged
merged 2 commits into from
Sep 5, 2023
Merged

Conversation

songqing
Copy link
Contributor

@songqing songqing commented Sep 4, 2023

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

When using session pool, we have added retryConnect() if connection was broken, but, there is still a problem.
When the session is invalid, the query will fail with the bad session even the user try to query more times, as session can not recover by itself now.

How do you solve it?

So, when the session is invalid, we can also try to recreate the session, and make sure all the session is valid in the session pool.

@songqing
Copy link
Contributor Author

songqing commented Sep 4, 2023

@Shylock-Hg Could you help to review this PR?

@@ -110,6 +110,12 @@ class Session {
return toLocal(data, offsetSecs_);
}

bool isSessionError(const ExecutionResponse &resp) {
Copy link
Contributor

Choose a reason for hiding this comment

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

static

@Shylock-Hg Shylock-Hg merged commit 0e671f1 into vesoft-inc:master Sep 5, 2023
7 of 11 checks passed
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.

None yet

2 participants