Add comments on ShutdownWorkerRequest specifying sticky queue name being optional #686
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.
What changed?
worker_instance_keyfield toShutdownWorkerRequest.Why?
We want to make sticky queue name optional, so SDK workers will always send shutdown requests (today Core only sends this request if there is a sticky queue enabled). 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.
This should enable server to then more efficiently interrupt poll calls, instead of having to wait for the graceful shutdown timeout. (This also requires all poll requests to contain the Worker Instance Key, can be added in a future PR)
Technically 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 a new field
Server PR