SDK doesn't allow a single WorkflowTask poller and forces the value to '2' if specified#1451
Merged
Spikhalskiy merged 2 commits intotemporalio:masterfrom Sep 23, 2022
Merged
Conversation
Sushisource
approved these changes
Sep 22, 2022
Member
Sushisource
left a comment
There was a problem hiding this comment.
Heh, I ran into the same thing back when working on this in core
mjameswh
reviewed
Sep 22, 2022
| factoryOptions.getWorkflowHostLocalTaskQueueScheduleToStartTimeout(); | ||
| } | ||
|
|
||
| int maxConcurrentWorkflowTaskPollers = options.getMaxConcurrentWorkflowTaskPollers(); |
Contributor
There was a problem hiding this comment.
Nit: I'd put this in WorkerOptions::Builder::validateAndBuildWithDefaults()...
Contributor
Author
There was a problem hiding this comment.
Yeah, I thought about it, because it looks like the right place, but decided against it.
- Some users may be building with just build. To catch them it will be a duplicate
- Users may not like validateAndBuildWithDefaults CHANGING their explicitly set values. If they read it somewhere afterward. It's not what this method should do. It should error out if the value specified by the user is incorrect. And we can't error out because of backward compatibility.
After considering it I decided to carry an incorrect but tolerable value over and correct it on a later stage in the Worker.
mjameswh
approved these changes
Sep 22, 2022
cretz
approved these changes
Sep 23, 2022
Co-authored-by: Spencer Judge <sjudge@hey.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #1438
WorkerOptions.Builder#setMaxConcurrentWorkflowTaskPollers(1)became an illegal configuration leading a worker to listen only on a sticky task queue. In this PR worker will override 1 to 2 and log a warning about it.