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

Drain tasks when a thread errors #97

Open
docktermj opened this issue Mar 8, 2022 · 0 comments
Open

Drain tasks when a thread errors #97

docktermj opened this issue Mar 8, 2022 · 0 comments
Assignees

Comments

@docktermj
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When SENZING_EXIT_ON_THREAD_TERMINATION is true

https://github.com/Senzing/redoer/blob/6d193de879247a8782f73deafe7f705024b66137/redoer.py#L138-L142

The code immediately kills the program.

https://github.com/Senzing/redoer/blob/6d193de879247a8782f73deafe7f705024b66137/redoer.py#L1653-L1657

The problem with this approach is that it could kill "in-flight" messages. Under normal circumstances this is OK because the "in-flight" messages would not be committed to Kafka and a different consumer would be given the message after a period of time.

However, if the code is changed to send a commit to Kafka before guaranteed delivery to Senzing, then killing the program could kill "in-flight" messages for each thread.

To minimize this, when a thread terminates and SENZING_EXIT_ON_THREAD_TERMINATION is true, then allow each thread to complete (including the monitoring thread) and then exist the program.

@github-actions github-actions bot added the triage Need to triage label Mar 8, 2022
@jamietypovsky jamietypovsky removed the triage Need to triage label Mar 10, 2022
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

No branches or pull requests

2 participants