Description
Currently the autodetect
process has to know how to load model state formats going right back to version 5.5. In 8.x we would like to drop support for loading model states that predate 7.0. This means that during 7.x we must offer a way for users to easily upgrade model snapshots in 5.x or 6.x formats into the latest 7.x format.
The autodetect
process already contains the trickiest parts of the code to do this, as it is what would happen if you reverted to the old model snapshot, then opened the job, sent it some data and closed it. However, to support migration via the upgrade assistant we need small changes:
- It should not be necessary to send data to the job to force it to write the model state
- The model state should be written out with exactly the same ID and description as what was restored, so that the rewritten snapshot overwrites the one that was upgraded
- The model snapshot ID should not be set as the active model snapshot for the job - this should remain unchanged by the process of upgrading an old model snapshot
This project will require a mixture of Java and C++ changes.
On the C++ side the w
control message should be amended such that it can contain optional information. If no optional information is sent then model state should be background persisted if data has been seen (i.e. what the w
control message currently does). But if a model snapshot ID and description are sent then a snapshot should be unconditionally persisted (even if data has not been seen) in the foreground using the supplied snapshot ID and description instead of the generated ones.
On the Java side the changes will be to add a new endpoint for upgrading a model snapshot, writing the appropriate control message and not updating the job config on receipt of the new model snapshot document.
Eventually this endpoint can be used from the upgrade assistant, although this is out of scope for phase 1 of this work.