Open phlip9 opened 1 month ago
cc @abs0luty @programatik29
We were having issues with graceful shutdown delays in grapevine, and have confirmed that this patch fixes them. Shutdown now happens in ~30ms.
cc @abs0luty @programatik29
Would be great to get this merged upstream : )
The hyper v1 migration PR (#93) accidentally (?) removed the call to
serve_future.graceful_shutdown()
, which prevents the server from shutting down until all client connections close on their own (or we hit the hard shutdown timeout).In practice, this meant we always hit the hard shutdown timeout, since most clients use connection pools with connection keepalive.
With this change, graceful shutdown will now correctly stop handling any new requests after it's triggered, while letting existing requests complete (within the timeout of course).
The fix itself is just one line:
The bulk of the PR is fixing the graceful shutdown tests.
Fixes #114