Blocker for #2545632: [PP1] Move memory reclamation out of migrate executable
Problem/Motivation
Currently migration events have no way of interacting with the run loops except to cause the row to fail. This means that more elaborate behaviors like triggering a migration to stop or reset can't happen.
Proposed resolution
Allow migration events to effect their run loops. This could be handled by exceptions but unfortunately though since postSave happens before map saving it would always bypass that even if it was ok to finish the save. The best solution is probably to track some sort of execution status. That status sits in "continuing" and events can set a value on the event that then makes its way onto the executable where it is then handled. This also roughly matches the "checkStatus" method that currently exists on the executable object.
Comments
Comment #2
neclimdulI always forget dreditors clone brings over the status...
Comment #4
mikeryanApart from the specific memory reclamation use case, is there a need here that isn't addressed by interruptMigration?
Comment #5
heddnre #4, there probably are use cases. If you need a feature, in some world or galexy, that functionality is probably going to be needed. However, it is probably rare.
Also look at #2821216: Move memory reclamation out of migrate executable, which is fixing this for the OOM use case.
Comment #11
heddnDue to the stability of the migrate API, I don't think this will happen. Cleaning up the queue.