Skip to content

fix(zero): make zero shutdown cleanly#9525

Merged
matthewmcneely merged 3 commits intodgraph-io:mainfrom
xqqp:fix_zero_shutdown
Dec 30, 2025
Merged

fix(zero): make zero shutdown cleanly#9525
matthewmcneely merged 3 commits intodgraph-io:mainfrom
xqqp:fix_zero_shutdown

Conversation

@xqqp
Copy link
Contributor

@xqqp xqqp commented Nov 11, 2025

Zero currently has several issues related to shutdown:

  • remove enterprise license completely from dgraph #9367 removed a call to updateEnterpriseState() without decreasing the wait group counter. This makes zero wait indefinitely, or exit with a return code other than zero after it has been forced to terminate.
  • Pools never get shutdown, which keeps the pool's health check alive, resulting in logs with connection failures.
  • The pool health check uses time.Sleep, so even if pools would get shutdown, the shutdown would be delayed by the remaining sleep duration.

This PR sets the appropriate wait group counter, implements a function which removes pools on shutdown and switches from time.Sleep to time.Tick in the health check.

@xqqp xqqp force-pushed the fix_zero_shutdown branch from ee56b98 to 9334cda Compare November 11, 2025 16:21
@xqqp xqqp force-pushed the fix_zero_shutdown branch 2 times, most recently from 2bdc328 to 13978f2 Compare November 25, 2025 22:40
@xqqp xqqp force-pushed the fix_zero_shutdown branch from 13978f2 to 2569fee Compare December 1, 2025 19:56
@xqqp xqqp force-pushed the fix_zero_shutdown branch 2 times, most recently from 90d48a5 to 440f014 Compare December 9, 2025 17:59
@xqqp xqqp force-pushed the fix_zero_shutdown branch from 440f014 to a3f364c Compare December 29, 2025 12:28
@xqqp xqqp requested a review from a team as a code owner December 29, 2025 12:28
Copy link
Contributor

@matthewmcneely matthewmcneely left a comment

Choose a reason for hiding this comment

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

Thanks @xqqp. It's nice to have the zero's shutting down gracefully again

@matthewmcneely matthewmcneely merged commit a3d33ee into dgraph-io:main Dec 30, 2025
24 of 25 checks passed
@xqqp xqqp deleted the fix_zero_shutdown branch December 30, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants