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

refactor: move to meta-service handshake into pool #14161

Merged
merged 1 commit into from Dec 27, 2023

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Dec 26, 2023

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

refactor: move to meta-service handshake into poll

Before this commit the connection pool stores raw connections Channel.
Before using one, the client handshake with the server everytime using a
channel.

In this commit, the handshake is moved into the connection pool and the
pool stores MetaServiceClient that already finished the handshake
phase.

Thus the client no longer needs to send a handshake RPC before using an
in-pool connection.

Changelog

  • Improvement

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Dec 26, 2023
@drmingdrmer drmingdrmer force-pushed the 49-refine-pool branch 3 times, most recently from e06929b to f32a09b Compare December 27, 2023 01:57
Copy link
Member Author

@drmingdrmer drmingdrmer left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 9 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @drmingdrmer)

@drmingdrmer drmingdrmer marked this pull request as ready for review December 27, 2023 02:08
@drmingdrmer drmingdrmer force-pushed the 49-refine-pool branch 4 times, most recently from 9f91fb2 to 7686640 Compare December 27, 2023 05:45
Copy link
Member Author

@drmingdrmer drmingdrmer left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 9 files at r3, 1 of 1 files at r4, 2 of 2 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @drmingdrmer)

Before this commit the connection pool stores raw connections `Channel`.
Before using one, the client handshake with the server everytime using a
channel.

In this commit, the handshake is moved into the connection pool and the
pool stores `MetaServiceClient` that already finished the handshake
phase.

Thus the client no longer needs to send a handshake RPC before using an
in-pool connection.

Other changes:

- Add meta gRPC client re-connect test
- Add: EstablishedClient, when handshake expire, drop the client and create a new one.
@drmingdrmer drmingdrmer changed the title refactor: move to meta-service handshake into poll refactor: move to meta-service handshake into pool Dec 27, 2023
@drmingdrmer drmingdrmer added this pull request to the merge queue Dec 27, 2023
@BohuTANG BohuTANG removed this pull request from the merge queue due to a manual request Dec 27, 2023
@BohuTANG BohuTANG merged commit 199ef28 into datafuselabs:main Dec 27, 2023
70 of 71 checks passed
@drmingdrmer drmingdrmer deleted the 49-refine-pool branch December 27, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-refactor this PR changes the code base without new features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants