Project: springxd
Issue XD-1500: Stream deployment race condition
When a container is started, the leader admin will scan the deployed streams to determine if any have modules that need to be deployed on the new container. When a stream is deployed, the leader admin will select containers to deploy modules to. If a new container and stream are deployed at the same time, there is the window for a race condition where both attempt to deploy a module to a container. This can be solved by (at least one) of the following: * Consider using a single thread in the admin leader to handle all ZooKeeper updates. This means that the handling of new containers and stream deployment requests will not happen concurrently. * Trap the {{NodeExists}} exception when creating the {{/xd/deployments/modules/...}} node in ZooKeeper
Story points: 5