Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

dbmate should roll the transaction back on sigint #98

Closed
wkalt opened this issue Oct 21, 2019 · 2 comments
Closed

dbmate should roll the transaction back on sigint #98

wkalt opened this issue Oct 21, 2019 · 2 comments

Comments

@wkalt
Copy link
Contributor

wkalt commented Oct 21, 2019

I think today there is a shutdown race that sometimes causes a rollback, but to make it consistent I think we need a signal handler in here:
https://github.com/amacneil/dbmate/blob/master/pkg/dbmate/db.go#L188,L203

How about the first sigint triggers the rollback (and subsequent exit), and the second one does an immediate exit?

@wkalt
Copy link
Contributor Author

wkalt commented Oct 21, 2019

#99 would change the location of the signal handler

@amacneil
Copy link
Owner

Sounds good. I like the behavior of graceful shutdown on first signal and hard exit on second.

We should probably handle SIGTERM the same way, I don't know what our current behavior is.

Repository owner locked and limited conversation to collaborators Dec 19, 2022
@amacneil amacneil converted this issue into discussion #368 Dec 19, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants