dbmate should roll the transaction back on sigint #368
wkalt
started this conversation in
Feature Ideas
Replies: 2 comments
-
#99 would change the location of the signal handler |
Beta Was this translation helpful? Give feedback.
0 replies
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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?
Beta Was this translation helpful? Give feedback.
All reactions