Skip to content

Conversation

Spikhalskiy
Copy link
Contributor

@Spikhalskiy Spikhalskiy commented Sep 15, 2022

Now Workflow Task pollers reserve executor slots before attempting to perform a long poll.
This behavior is now aligned with the same mechanic for activities and what happens in GoSDK & Core.

Towards #998
Closes #760

@Spikhalskiy Spikhalskiy marked this pull request as ready for review September 15, 2022 00:27
Copy link
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

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

This LGTM, but I'd definitely take extra care with the semaphore - I had a few problems where it'd get out of whack that I had to solve by passing around an object which represented the workflow task and when dropped would release the permit.

You've basically done that here too, and I think it looks fine, but worth running some stress tests (which I suppose is the point of this anyway)

@Spikhalskiy Spikhalskiy merged commit 3efbe7e into temporalio:master Sep 15, 2022
@Spikhalskiy Spikhalskiy deleted the slots-reservation branch September 15, 2022 00:44
@Spikhalskiy Spikhalskiy added this to the 1.17.0 milestone Sep 15, 2022
@Spikhalskiy Spikhalskiy added the enhancement User experience label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement User experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Workflow Tasks backpressure for Pollers if there is no available executors

2 participants