Tested this out by starting a vagrant box. Changed the code inside of 
[SchedulerThriftInterface.java](https://github.com/rdelval/aurora/blob/staggeredUpdates/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java#L798)
 to set these fields upon receiving the request:

```    // Keep old job schema in case we want to revert to a lower version of 
Aurora that doesn't
    // support variable update group sizes
    int totalInstancesFromGroups;
    if (settings.getUpdateStrategy().isSetQueueStrategy()) {
      totalInstancesFromGroups = 
settings.getUpdateStrategy().getQueueStrategy().getGroupSize();
      settings.setWaitForBatchCompletion(false);
      
settings.setUpdateGroupSize(settings.getUpdateStrategy().getQueueStrategy().getGroupSize());
    } else if (settings.getUpdateStrategy().isSetBatchStrategy()) {
      totalInstancesFromGroups = 
settings.getUpdateStrategy().getBatchStrategy().getGroupSize();
      settings.setWaitForBatchCompletion(true);
      
settings.setUpdateGroupSize(settings.getUpdateStrategy().getBatchStrategy().getGroupSize());
    } else if (settings.getUpdateStrategy().isSetVarBatchStrategy()) {
      VariableBatchJobUpdateStrategy strategy = 
settings.getUpdateStrategy().getVarBatchStrategy();
      settings.setWaitForBatchCompletion(true);
      // Setting this value to allow graceful rollback to version 0.21.0
      // TODO(rdelvalle): Remove compatibility settings once version 0.22.0 
ships
      settings.setUpdateGroupSize(1); // Necessary because we haven't validated 
fields yet.
```

I created a Variable batch update, then shut down the scheduler, and checked 
out tag rel/0.21.0 and ran aurorabuild all on the vagrant box. 

The scheduler came up fine. I forced a snapshot and a backup, restarted the 
scheduler with out issue. I upgraded the vagrant box back to the staggered 
updates patch and there was info loss (update no longer had staggered updates 
fields set so it stayed as a batch update), which in this case is an acceptable 
outcome IMO. 

Will update the patch with all the changes.

[ Full content available at: https://github.com/apache/aurora/pull/37 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to