Fix races and lost state in monitoring, multiprocessing and worker - #1491
Merged
JosepSampe merged 5 commits intoSep 23, 2026
Merged
JosepSampe merged 5 commits into
JosepSampe merged 5 commits into
Conversation
- Storage monitor: keep a finished call whose init mark is not listed yet for the next poll, instead of dropping its worker token - Monitor: guard status application and token release with a shared lock, so two threads cannot both return a token for one chunk or put a finished call back to running - RLock: only the owning thread (pid, thread id) may re-enter - Condition: a timed-out wait removes its handle from the notify list, or takes a notify that arrived just after the timeout - SemLock: refresh the Redis expiry on acquire and release, since a released lock was recreated with no TTL - JobRunner: report an unpickleable exception with its traceback as text; the traceback object itself cannot be pickled - Handler: close the JobRunner pipe explicitly, even if the finish event fails - Tests: regression test for each fix; the fake Redis now deletes empty lists like real Redis does; the telemetry test fakes now have the state flags real futures have
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Developer's Certificate of Origin 1.1