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 mysql server for runtime #274

Merged
merged 29 commits into from
Aug 25, 2022

Conversation

xuanyuan300
Copy link
Contributor

@xuanyuan300 xuanyuan300 commented Aug 25, 2022

What's Changed:
The goal of this refactor is to improve the scalability of the runtime, Users can implements their own handling logic.
The important changes as follows.

Trait:

  1. Add MySQLService trait to handle the command for mysql protocol.
    Any third-part can be implements MySQLSerivce.

Struct:

  1. Add MySQLInstance struct to start a MySQLService instance, it can be execute the method of MySQLSerice trait.
  2. Add PisaMySQLService struct to implements the MySQLService trait as a default implemenets in the Pisa-Proxy internal.

Codec:

  1. Add HandshakeCodec to parsing mysql handshake packet.
  2. Add PacketCodec to parsing mysql protocol.

Note:
This pr also fix some unused result warn.

Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
…yuan300/pisanix into refactor-mysqlserver-codec6

Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
…pisanix into refactor-mysqlserver-codec6

Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
@xuanyuan300 xuanyuan300 added type:refactor Refactor some design or implementation app:pisa-proxy Pisa-Proxy related changes in:runtime Runtime related changes in:protocol Protocol related changes labels Aug 25, 2022
@xuanyuan300 xuanyuan300 added this to the v0.3.0 milestone Aug 25, 2022
@codecov
Copy link

codecov bot commented Aug 25, 2022

Codecov Report

Merging #274 (b80b706) into master (df61eb4) will increase coverage by 3.32%.
The diff coverage is 79.68%.

@@            Coverage Diff             @@
##           master     #274      +/-   ##
==========================================
+ Coverage   66.97%   70.30%   +3.32%     
==========================================
  Files           7        6       -1     
  Lines         427      495      +68     
==========================================
+ Hits          286      348      +62     
- Misses        133      137       +4     
- Partials        8       10       +2     
Flag Coverage Δ
unittests 70.30% <79.68%> (+3.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pisa-controller/pkg/webhook/server.go 26.66% <0.00%> (ø)
pisa-controller/pkg/proxy/http.go 58.62% <53.84%> (+0.72%) ⬆️
pisa-controller/pkg/webhook/injection.go 59.02% <82.56%> (+20.08%) ⬆️
pisa-controller/pkg/proxy/builder.go 91.21% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
Signed-off-by: xuanyuan300 <xuanyuan300@gmail.com>
@mlycore mlycore merged commit 906d394 into database-mesh:master Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:pisa-proxy Pisa-Proxy related changes in:protocol Protocol related changes in:runtime Runtime related changes size/XXL type:refactor Refactor some design or implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants