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

neclimdul created an issue. See original summary.

neclimdul’s picture

Status: Postponed » Active

I always forget dreditors clone brings over the status...

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mikeryan’s picture

Apart from the specific memory reclamation use case, is there a need here that isn't addressed by interruptMigration?

heddn’s picture

re #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.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

heddn’s picture

Status: Active » Closed (won't fix)

Due to the stability of the migrate API, I don't think this will happen. Cleaning up the queue.