Skip to content

Conversation

@coreywoodfield
Copy link

Worker threads that are waiting for a work response get interrupted if they are still going after the execution has completed (See RedisShardBackplane.pollExecution and ShardWorkerContext.resumePoller and Executor.runInterruptible). This is happening to us often. Assuming the problem is in buildfarm, and not our rules, it may be that the execution writes its entire response and completes within the span of the Thread.sleep(10) call, and then the poller sees that the execution is complete and interrupts the thread before it gets the chance to check the output stream again. This seems a bit far-fetched, but it's the only explanation I came up with. By letting the read block, instead of manually blocking until the read won't block, we should react to the work response more promptly, and potentially finish before we get interrupted.

…leep

Worker threads that are waiting for a work response get interrupted if
they are still going after the execution has completed (See
RedisShardBackplane.pollExecution and ShardWorkerContext.resumePoller
and Executor.runInterruptible). This is happening to us often. Assuming
the problem is in buildfarm, and not our rules, it may be that the
execution writes its entire response and completes within the span of
the Thread.sleep(10) call, and then the poller sees that the execution
is complete and interrupts the thread before it gets the chance to check
the output stream again. This seems a bit far-fetched, but it's the only
explanation I came up with. By letting the read block, instead of
manually blocking until the read won't block, we should react to the
work response more promptly, and potentially finish before we get
interrupted.
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