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: correctly open table when distributed datanode restart #576

Merged
merged 5 commits into from
Nov 21, 2022

Conversation

MichaelScofield
Copy link
Collaborator

@MichaelScofield MichaelScofield commented Nov 18, 2022

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

fix #402

Please explain IN DETAIL what the changes are in this PR and why they are needed:

  • Summarize your change (mandatory)
  1. correctly open table when distributed datanode restart
  2. concat node_id in data dir and wal dir of datanode, when it is started in distributed mode
  3. upgrade opensrv-mysql to latest version 0.2
  4. add --data-dir and --wal-dir to command line options, to indicate dn's data dir and wal dir in distributed mode.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Merging #576 (aae5624) into develop (ca5734e) will decrease coverage by 0.03%.
The diff coverage is 67.13%.

@@             Coverage Diff             @@
##           develop     #576      +/-   ##
===========================================
- Coverage    86.45%   86.41%   -0.04%     
===========================================
  Files          399      400       +1     
  Lines        50649    50675      +26     
===========================================
+ Hits         43788    43793       +5     
- Misses        6861     6882      +21     
Flag Coverage Δ
rust 86.41% <67.13%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
src/api/src/error.rs 35.71% <0.00%> (-5.96%) ⬇️
src/api/src/lib.rs 100.00% <ø> (ø)
src/catalog/src/local/manager.rs 66.36% <0.00%> (-0.21%) ⬇️
src/catalog/src/remote/manager.rs 70.04% <0.00%> (-0.47%) ⬇️
src/datanode/src/error.rs 62.19% <0.00%> (-0.77%) ⬇️
src/frontend/src/error.rs 9.25% <0.00%> (-0.36%) ⬇️
src/query/src/optimizer.rs 79.59% <ø> (-0.33%) ⬇️
src/table/src/requests.rs 25.00% <ø> (ø)
src/servers/src/mysql/writer.rs 70.76% <42.85%> (-5.30%) ⬇️
src/servers/src/mysql/handler.rs 68.04% <44.44%> (+2.82%) ⬆️
... and 11 more

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

@MichaelScofield
Copy link
Collaborator Author

@killme2008 PTAL

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

Good job. The PR content may need to be edited too.

src/frontend/src/instance/distributed.rs Outdated Show resolved Hide resolved
src/mito/src/engine.rs Show resolved Hide resolved
src/servers/src/mysql/server.rs Show resolved Hide resolved
@MichaelScofield
Copy link
Collaborator Author

@killme2008 PTAL

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM

@MichaelScofield
Copy link
Collaborator Author

@v0y4g3r PTAL

Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

Generally LGTM

src/servers/src/mysql/handler.rs Show resolved Hide resolved
@MichaelScofield MichaelScofield merged commit 62fcb54 into GreptimeTeam:develop Nov 21, 2022
@MichaelScofield MichaelScofield deleted the fix/dn-restart branch November 21, 2022 07:15
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
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.

Cannot operate data after frontend restart
3 participants