Skip to content

feat: implement automatic region failure detector registrations #6370

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

Merged
merged 7 commits into from
Jun 24, 2025

Conversation

WenyXu
Copy link
Member

@WenyXu WenyXu commented Jun 20, 2025

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

This PR adds automatic region failure detector registrations. The metasrv now automatically discovers and registers failure detectors for all regions found in table routes, and ensures that metasrv leader will only register once throughout its lifecycle.

Configuration changes:

  • Add region_failure_detector_initialization_delay option.
    This delay helps prevent premature initialization of region failure detectors in cases where cluster maintenance mode is enabled right after metasrv starts, especially when the cluster is not deployed via the recommended GreptimeDB Operator. Without this delay, early detector registration may trigger unnecessary region failovers during datanode startup.

PR Checklist

Please convert it to a draft if some of the following conditions are not met.

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.
  • API changes are backward compatible.
  • Schema or data changes are backward compatible.

@github-actions github-actions bot added size/S docs-not-required This change does not impact docs. size/M and removed size/S labels Jun 20, 2025
@WenyXu WenyXu force-pushed the feat/inspect-region branch from 2fa07e9 to e3b0897 Compare June 23, 2025 07:19
@WenyXu WenyXu force-pushed the feat/inspect-region branch from a6e0841 to 366d9ab Compare June 23, 2025 08:05
@WenyXu WenyXu force-pushed the feat/inspect-region branch from 366d9ab to 01c9808 Compare June 23, 2025 08:08
@WenyXu WenyXu marked this pull request as ready for review June 23, 2025 08:11
@WenyXu WenyXu requested review from MichaelScofield and a team as code owners June 23, 2025 08:11
@github-actions github-actions bot added docs-required This change requires docs update. and removed docs-not-required This change does not impact docs. labels Jun 23, 2025
@WenyXu WenyXu force-pushed the feat/inspect-region branch from 921de82 to 9c22ec8 Compare June 24, 2025 02:55
@WenyXu WenyXu force-pushed the feat/inspect-region branch from 9c22ec8 to 60d50bd Compare June 24, 2025 03:15
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

@WenyXu WenyXu added this pull request to the merge queue Jun 24, 2025
Merged via the queue into GreptimeTeam:main with commit 2401933 Jun 24, 2025
50 checks passed
@WenyXu WenyXu deleted the feat/inspect-region branch June 24, 2025 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-required This change requires docs update. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants