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

Fix possible data corruption due to race condition in StreamRedirector #1773

Merged
merged 4 commits into from
Jun 26, 2024

Conversation

mattt
Copy link
Contributor

@mattt mattt commented Jun 26, 2024

Alternative to #1758

Resolves #982 Resolves #1308 Resolves #1446

@mattt mattt merged commit e8e2e91 into main Jun 26, 2024
12 checks passed
@mattt mattt deleted the fix/race_condition branch June 26, 2024 14:19
with self._events_lock:
if isinstance(result, types.GeneratorType):
self._events.send(PredictionOutputType(multi=True))
for r in result:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is holding the lock for wayyyyyy too long. If the result is generator we absolutely should not be holding the lock for the entire for r in result loop.

I wonder if this is related to the occasional customer report of not getting logs?

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.

UnpicklingError: invalid load key, '\x00' invalid load key Unpickling errors
3 participants