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: refactor region lease keeper #2704

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Nov 7, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

I realized we can't simply retain active leader regions and also need to find out the downgraded leader regions.

  1. Refactor find_staled_leader_regions; now, it can find out the downgraded leader regions.
  2. Add find_staled_follower_regions, returning upgradable and closable regions.

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)

#2700

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #2704 (99aa8d6) into develop (7e0dcfc) will decrease coverage by 0.33%.
Report is 6 commits behind head on develop.
The diff coverage is 98.28%.

❗ Current head 99aa8d6 differs from pull request most recent head a80462d. Consider uploading reports for the commit a80462d to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2704      +/-   ##
===========================================
- Coverage    85.16%   84.83%   -0.33%     
===========================================
  Files          763      763              
  Lines       122831   123311     +480     
===========================================
+ Hits        104613   104615       +2     
- Misses       18218    18696     +478     

src/meta-srv/src/region/lease_keeper.rs Outdated Show resolved Hide resolved
src/meta-srv/src/region/lease_keeper.rs Outdated Show resolved Hide resolved
src/meta-srv/src/region/lease_keeper.rs Show resolved Hide resolved
@WenyXu
Copy link
Member Author

WenyXu commented Nov 9, 2023

@fengjiachun PTAL

Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

@fengjiachun fengjiachun added this pull request to the merge queue Nov 9, 2023
Merged via the queue into GreptimeTeam:develop with commit 9d029f7 Nov 9, 2023
11 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.

None yet

3 participants