Workers with single decision poller with sticky tasklist feature enabled will stop processing
Opened this issue · 2 comments
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
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
We decided to add enforcement to have at least 2 decision pollers to avoid breaking existing behaviors