Do workflow and activity workers on separate task queues need to start in a specific order under PINNED versioning?

Let’s assume two workers run in the same pod, in separate containers. One worker executes workflows and polls workflow-queue. The other worker executes activities and polls activity-queue. The workflow implementations use the PINNED versioning behavior.

My understanding is that if the workflow worker starts first on a new deployment version, it can schedule an activity on `activity-queue` before the new activity worker has notified Temporal that it will poll `activity-queue` queue on the new deployment version. That activity could then be treated as “independent” and picked up by the old activity workers, because the new activity worker is still starting up.

Is that correct ? Just want to confirm whether this understanding is correct

Hey @Dmitry_Sysolyatin !

Your understanding is indeed right. The main idea is that until the activity task queue has registered itself in the worker-version your workflow is pinned to, the activities that are spawned by the workflow are treated as “independent” in nature. They are dispatched to the “current version” of the activity task queue’s Worker Deployment, which as you have pointed out is the reason why older activity workers are picking up your activity tasks.

Once you do have the activity worker(s) come up and register themselves in the version where your workflow workers are registered (which are executing the pinned workflow), you shall see the workflow tasks being picked up by the latest activity workers.

@ShivamSaraf Thanks for your answer!