...
When the "cpus" parameter, i.e. the instance count, was qbmodify-ed down and then up, some instances would end up being dispatched and running on multiple workers at the same time. This was due to the fact that Until nowprior to this fix, when a job's cpus count is reduced, instances of higher ID numbers were always chosen to retire (i.e., if a 5-instance job was reduce to 3, then instances 3 and 4 were retired). Now, instead, the first instances that request a "requestwork" are retired.
Also, when a job's cpus count is increased, the supe will first revitalize any instances that are already in the "done" state, and then add more instances to the job if necessary. For example, say a 5-instance job was reduced to 3 instances, and instance 1 and 2 were retired in response (0,3,4 are running). If, later, the job was modified again to increase the instance count to 7, instances 1 and 2 are revitalized (i.e. moved back to "pending") AND 2 new instances, 5 and 6, are generated.
...