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

Workers with single decision poller with sticky tasklist feature enabled will stop processing #1369

Open
shijiesheng opened this issue Oct 8, 2024 · 2 comments

Comments

@shijiesheng
Copy link
Contributor

Describe the bug
Decision worker will stop processing if decision poller count is 1 and sticky tasklist is enabled

To Reproduce
MaxConcurrentDecisionTaskPollers is set to 1 (default 2)
Or MinConcurrentDecisionTaskPollers is set to 1 and Poller Auto Scaler is enabled

Expected behavior
Workflow workers should process decision tasks

@shijiesheng
Copy link
Contributor Author

Root Cause
Current implementation is:
X number of decision goroutines are started
Each goroutine will either call sticky tasklist or normal tasklist based on metrics
When X = 1, the condition will always be true. This causes decision polling to stop for normal tasklist

Temporal keeps the same logic https://github.com/temporalio/sdk-go/blob/cdd30702f1ba479b57111763095e24a25a04ea53/internal/internal_task_pollers.go#L781

@shijiesheng
Copy link
Contributor Author

We decided to add enforcement to have at least 2 decision pollers to avoid breaking existing behaviors

@shijiesheng shijiesheng reopened this Oct 8, 2024
shijiesheng added a commit that referenced this issue Oct 10, 2024
What changed?

added a worker.NewV2 interface that will return error and a deprecation message on New api.
added validation on WorkerOptions
-- decision poller should be larger than 1 if value is set (not zero) and sticky execution is enabled.
Why?
#1369

How did you test it?
Unit Test

Potential risks
Low
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

No branches or pull requests

1 participant