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

main: don't break graceful shutdown on init script exit #9415

Merged

Conversation

nshy
Copy link
Contributor

@nshy nshy commented Nov 27, 2023

Graceful shutdown is done in a special fiber which is started for example on SIGTERM. So it can run concurrently with fiber executing Tarantool init script. On init fiber exit we break event loop to pass control back to the Tarantool initialization code. But we fail to run event loop a bit more to finish graceful shutdown.

The test is a bit contrived. A more real world case is when Tarantool is termintated during lingering box.cfg().

Close #9411

@nshy nshy requested review from a team as code owners November 27, 2023 12:30
Graceful shutdown is done in a special fiber which is started for
example on SIGTERM. So it can run concurrently with fiber executing
Tarantool init script. On init fiber exit we break event loop to pass
control back to the Tarantool initialization code. But we fail to run
event loop a bit more to finish graceful shutdown.

The test is a bit contrived. A more real world case is when Tarantool is
termintated during lingering box.cfg().

Close tarantool#9411

NO_DOC=bugfix
@nshy nshy force-pushed the gh-9411-fix-graceful-shutdown-breakage branch from c3c5eb2 to e0eb1df Compare November 27, 2023 12:30
@coveralls
Copy link

Coverage Status

coverage: 86.677% (+0.006%) from 86.671%
when pulling e0eb1df on nshy:gh-9411-fix-graceful-shutdown-breakage
into a5e498d
on tarantool:master
.

@nshy nshy requested a review from locker November 27, 2023 13:47
@locker locker assigned nshy and unassigned locker Nov 27, 2023
@nshy nshy assigned locker and unassigned nshy Nov 28, 2023
@locker locker added the full-ci Enables all tests for a pull request label Nov 28, 2023
@locker locker merged commit 786eb2a into tarantool:master Nov 28, 2023
106 checks passed
@locker
Copy link
Member

locker commented Nov 28, 2023

Cherry-picked to 2.11.

@nshy nshy deleted the gh-9411-fix-graceful-shutdown-breakage branch November 28, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-ci Enables all tests for a pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graceful shutdown exit before shutdown timeout expiration
5 participants