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 manifest manager lock to MitoRegion #3689

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Apr 10, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

#3456

What's changed and what's your intention?

This PR is a part of #3456

It moves methods in RegionManifestManagerInner to RegionManifestManager. Now the MitoRegion uses a lock to protect the manager. We can use that lock to ensure there is only one task updating manifest and VersionControl.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 10, 2024
@evenyag evenyag marked this pull request as ready for review April 10, 2024 06:37
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 92.03540% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 85.26%. Comparing base (02f806f) to head (ecaa8ca).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3689      +/-   ##
==========================================
- Coverage   85.57%   85.26%   -0.32%     
==========================================
  Files         957      962       +5     
  Lines      159226   160265    +1039     
==========================================
+ Hits       136258   136644     +386     
- Misses      22968    23621     +653     

@evenyag evenyag marked this pull request as draft April 10, 2024 07:23
@evenyag evenyag closed this Apr 10, 2024
@evenyag evenyag reopened this Apr 11, 2024
@evenyag evenyag force-pushed the refactor/manifest-manager branch from 6d57942 to cd79193 Compare April 11, 2024 07:17
@evenyag evenyag marked this pull request as ready for review April 11, 2024 07:37
@evenyag evenyag requested a review from v0y4g3r as a code owner April 11, 2024 07:37
src/mito2/src/error.rs Outdated Show resolved Hide resolved
src/mito2/src/manifest/manager.rs Show resolved Hide resolved
src/mito2/src/manifest/manager.rs Show resolved Hide resolved
src/mito2/src/manifest/manager.rs Show resolved Hide resolved
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.

LGTM

@evenyag evenyag requested a review from killme2008 April 15, 2024 03:29
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

@killme2008 killme2008 added this pull request to the merge queue Apr 15, 2024
Merged via the queue into GreptimeTeam:main with commit 2f4726f Apr 15, 2024
19 checks passed
@evenyag evenyag deleted the refactor/manifest-manager branch April 15, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants