fix(pool): make Destroy honour its own timeout instead of overrunning it - #63
fix(pool): make Destroy honour its own timeout instead of overrunning it#63xepozz wants to merge 1 commit into
Conversation
destroy_timeout was discarded whenever the caller passed a context with a deadline, and on expiry the workers were asked to stop over the relay instead of killed, which adds another 10s. Bound the context by the tighter of the two and kill on expiry. Reset had the same expiry branch.
|
Deadline timeout from the pool is forced only when the context is not used. And the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #63 +/- ##
==========================================
+ Coverage 78.05% 78.26% +0.20%
==========================================
Files 19 19
Lines 1171 1173 +2
==========================================
+ Hits 914 918 +4
+ Misses 257 255 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Destroy overruns whatever deadline it gets: Process.Stop waits a hardcoded 10s, so |
|
This is an AI-sloppy way to deal with the problem. While the case is probably worth attention, the way it is fixed is w/o proper understanding of how everything is connected in RR. So my suggestion is first to create a ticket, explain the case, provide a simple sample to reproduce the problem, and your reasoning also, where those problems were observed (probably in the temporal plugin). |
Reason for This PR
[Author TODO: add issue # or explain reasoning.]Description of Changes
destroy_timeout was discarded whenever the caller passed a context with a deadline, and on expiry the workers were asked to stop over the relay instead of killed, which adds another 10s. Bound the context by the tighter of the two and kill on expiry. Reset had the same expiry branch.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.
PR Checklist
[Author TODO: Meet these criteria.][Reviewer TODO: Verify that these criteria are met. Request changes if not]git commit -s).CHANGELOG.md.