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

Introduce interrupt and retry handling to initial definition sync. #321

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

DFINITYManu
Copy link
Contributor

We have been quite good with regards to handling interrupts / SIGTERMs almost from the very start in MSD. However, a small oversight with regards to initial sync caused #314 , which in turn causes the daemon to freeze upon shutdown if any definition failed its initial sync. The root cause is that the thread terminates on its own, not polling its end of the ender channel used to shut it down.

This PR fixes the issue.

In addition to that, we now also retry initial syncs just as failed incremental syncs are retried. This adds robustness in the face of temporary network outages just as MSD is starting to execute.

We have been quite good with regards to handling interrupts / SIGTERMs almost from the very start in MSD.  However, a small oversight with regards to initial sync caused #314 , which in turn causes the daemon to freeze upon shutdown if any definition failed its initial sync.  The root cause is that the thread terminates on its own, not polling its end of the ender channel used to shut it down.

This PR fixes the issue.

In addition to that, we now also retry initial syncs just as failed incremental syncs are retried.  This adds robustness in the face of temporary network outages just as MSD is starting to execute.
@DFINITYManu DFINITYManu requested a review from a team as a code owner April 17, 2024 11:47
@DFINITYManu DFINITYManu self-assigned this Apr 17, 2024
Copy link
Member

@sasa-tomic sasa-tomic left a comment

Choose a reason for hiding this comment

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

Nice catch! Thanks!

@DFINITYManu
Copy link
Contributor Author

Applying Cargo demands to codebase. Will soon merge.

@DFINITYManu DFINITYManu added this pull request to the merge queue Apr 17, 2024
Merged via the queue into main with commit b2bdd05 Apr 17, 2024
5 checks passed
@DFINITYManu DFINITYManu deleted the retryandinterrupt branch April 17, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants