-
Notifications
You must be signed in to change notification settings - Fork 84
Enhance ShutdownWorkerRequest and poll calls with worker_instance_key #686
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
Enhance ShutdownWorkerRequest and poll calls with worker_instance_key #686
Conversation
rkannan82
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Do we need to add this to PollNexusTaskQueueRequest as well? Not specifically for the server initiated shutdown.
dnr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update PR description to remove/rewrite
(This also requires all poll requests to contain the Worker Instance Key, can be added in a future PR)
since it's here now
What changed?
worker_instance_keyfield toShutdownWorkerRequest, as well as all other poll calls.ShutdownWorkerRequest.sticky_task_queuesaying it may be blank, now that we've expanded the scope of whenShutdownWorkerRequestis called.task_queueandtask_queue_kindtoShutdownWorkerRequestWhy?
ShutdownWorker was changed to always be sent by SDK (temporalio/sdk-core#1082), so sticky queue name is now optional. This plus the new heartbeat info we send on shutdown means Server will now have a more accurate map of which workers are shutting down.
Adding task queue and task_queue_kind should also allow us to fix a lost task issue, where there is a race when the SDK cancels an outstanding poll rpc and the server decides to send a task to that poller.
Technically some of this info exists in the worker heartbeat part of the message, but it needs to be lifted to its own field due to the scenario where worker heartbeating is disabled.
Breaking changes
N/A I think, just adding new fields
Server PR