Skip to content

SeekableStreamSupervisor: Don't await task futures in workerExec.#17403

Merged
gianm merged 1 commit intoapache:masterfrom
gianm:fix-sss-workerexec
Oct 24, 2024
Merged

SeekableStreamSupervisor: Don't await task futures in workerExec.#17403
gianm merged 1 commit intoapache:masterfrom
gianm:fix-sss-workerexec

Conversation

@gianm
Copy link
Contributor

@gianm gianm commented Oct 23, 2024

Following #17394, workerExec can get deadlocked with itself, because it waits for task futures and is also used as the connectExec for the task client. To fix this, we need to never await task futures in the workerExec.

There are two specific changes: in verifyAndMergeCheckpoints and checkpointTaskGroup, two coalesceAndAwait calls that formerly occurred in workerExec are replaced with Futures.transform (using a callback in workerExec instead).

Because this adjustment removes a source of blocking, it may also improve supervisor responsiveness for high task counts. This is not the primary goal, however. The primary goal is to fix the bug introduced by #17394.

Following apache#17394, workerExec can get deadlocked with itself, because it
waits for task futures and is also used as the connectExec for the task
client. To fix this, we need to never await task futures in the workerExec.

There are two specific changes: in "verifyAndMergeCheckpoints" and
"checkpointTaskGroup", two "coalesceAndAwait" calls that formerly occurred
in workerExec are replaced with Futures.transform (using a callback in
workerExec).

Because this adjustment removes a source of blocking, it may also improve
supervisor responsiveness for high task counts. This is not the primary
goal, however. The primary goal is to fix the bug introduced by apache#17394.
@gianm
Copy link
Contributor Author

gianm commented Oct 23, 2024

Viewing this diff with whitespace hidden better illustrates what the changes are. Most of the lines changed are only indentation.

@gianm gianm merged commit c4b513e into apache:master Oct 24, 2024
@gianm gianm deleted the fix-sss-workerexec branch October 24, 2024 19:07
@adarshsanjeev adarshsanjeev added this to the 32.0.0 milestone Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants