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

feat: allow initializing regions in background #2930

Merged

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Dec 14, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

  1. Introduce initialize_region_in_background, allowing users to initialize all regions in the background without blocking the startup.
  2. Introduce the RegionNotReady status code, and non-create/open requests trying to access the region under creating or opening will return the RegionNotReady instead of RegionNotFound.
  3. Introduce the RegionBusy status code, ensuring only one exclusive operation(e.g., open region, close region) will be executed simultaneously.

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)

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 28 lines in your changes are missing coverage. Please review.

Comparison is base (9da1f23) 85.82% compared to head (43c3e8e) 85.32%.

❗ Current head 43c3e8e differs from pull request most recent head 0ea06e0. Consider uploading reports for the commit 0ea06e0 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2930      +/-   ##
===========================================
- Coverage    85.82%   85.32%   -0.50%     
===========================================
  Files          775      770       -5     
  Lines       124230   124430     +200     
===========================================
- Hits        106621   106176     -445     
- Misses       17609    18254     +645     

@waynexia waynexia enabled auto-merge December 14, 2023 02:41
@WenyXu WenyXu force-pushed the refactor/open-regions-background branch from e49d122 to e930bb2 Compare December 14, 2023 06:21
@killme2008 killme2008 disabled auto-merge December 14, 2023 06:24
@WenyXu WenyXu marked this pull request as draft December 14, 2023 06:49
@WenyXu WenyXu changed the title refactor: open regions in background feat: allow initialize regions in background Dec 15, 2023
@WenyXu WenyXu marked this pull request as ready for review December 15, 2023 07:45
@WenyXu WenyXu force-pushed the refactor/open-regions-background branch 2 times, most recently from 202a620 to 439dbb4 Compare December 15, 2023 07:54
@WenyXu
Copy link
Member Author

WenyXu commented Dec 15, 2023

@waynexia The new commits changed a lot; it is better to review them again😇

@WenyXu WenyXu changed the title feat: allow initialize regions in background feat: allow initializing regions in background Dec 15, 2023
src/cmd/src/standalone.rs Outdated Show resolved Hide resolved
src/datanode/src/datanode.rs Outdated Show resolved Hide resolved
src/datanode/src/datanode.rs Outdated Show resolved Hide resolved
src/datanode/src/error.rs Outdated Show resolved Hide resolved
src/datanode/src/region_server.rs Outdated Show resolved Hide resolved
src/datanode/src/region_server.rs Outdated Show resolved Hide resolved
src/datanode/src/region_server.rs Outdated Show resolved Hide resolved
@WenyXu WenyXu self-assigned this Dec 18, 2023
@WenyXu WenyXu force-pushed the refactor/open-regions-background branch from 439dbb4 to 43c3e8e Compare December 20, 2023 08:21
@WenyXu
Copy link
Member Author

WenyXu commented Dec 20, 2023

@MichaelScofield @fengjiachun PTAL

@MichaelScofield
Copy link
Collaborator

@WenyXu conflicts

@WenyXu WenyXu marked this pull request as draft December 20, 2023 09:50
@WenyXu WenyXu force-pushed the refactor/open-regions-background branch from 43c3e8e to 0ea06e0 Compare December 20, 2023 10:34
@WenyXu WenyXu marked this pull request as ready for review December 20, 2023 10:34
@WenyXu
Copy link
Member Author

WenyXu commented Dec 20, 2023

@MichaelScofield @evenyag PTAL

@MichaelScofield MichaelScofield added this pull request to the merge queue Dec 20, 2023
Merged via the queue into GreptimeTeam:develop with commit 6c1c7d8 Dec 20, 2023
26 of 34 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.

4 participants