Conversation
| // situation that too many pollers (all of them in the worst case) will open only sticky queue | ||
| // polls observing a stickyBacklogSize == 1 for example (which actually can be 0 already at | ||
| // that moment) and get stuck causing dip in worker load. | ||
| if (stickyBacklogSize > pollersCount || stickyPollers <= normalPollers) { |
There was a problem hiding this comment.
I'm surprised that we don't guarantee at least one Poll for each Kind. That seems like a safer/more conservative behavior.
| // Unique id is needed to avoid collisions with other workers that may be created for the same | ||
| // task list and with the same identity. | ||
| UUID uniqueId = UUID.randomUUID(); | ||
| return String.format("%s:%s", workerIdentity, uniqueId); |
There was a problem hiding this comment.
This looks slightly different from the previous TaskList naming, does it match the Go client?
There was a problem hiding this comment.
It's a bit different from go client because it also includes the pid
| workerFactory.newWorker( | ||
| TASK_LIST, WorkerOptions.newBuilder().setMaxConcurrentWorkflowExecutionSize(2).build()); | ||
| TASK_LIST, | ||
| WorkerOptions.newBuilder().setMaxConcurrentWorkflowExecutionSize(20).build()); |
There was a problem hiding this comment.
the concurrent size needs to be larger than 2
There was a problem hiding this comment.
But why? Shouldn't we be evicting sticky workflows for incoming workflows? This shouldn't impact it
Code Review
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
| pollRequest.setTaskList(tl); | ||
| TaskListKind taskListKind = stickyQueueBalancer.makePoll(); | ||
| boolean isSticky = TaskListKind.STICKY.equals(taskListKind); | ||
| PollForDecisionTaskRequest request = |
There was a problem hiding this comment.
Nit: move to separate method, pass the TaskList as a parameter
What changed?
Cherry pick several changes from temporal to cadence
relates to temporalio/sdk-java#998
Why?
See temporalio/sdk-java#998.
Another reason is that we want to enforce rate limiting on sticky pollers.
How did you test it?
./gradlew test
Potential risks
This changes several components in java client. It could make workflow/poller to be stuck if there is anything wrong.
Release notes
Documentation Changes