Skip to content

New batch started because of not enough reclaimed memory seems to forget which migrations have already run leading to missing migration dependencies

Issue #2701121 on drupal.org by hchonov.

Problem/Motivation

I have two migrations - d6_migration_A and d6_migration_B.
d6_migration_B has d6_migration_A as a required migration dependency.

If not enough memory could be reclaimed during the migration then a new batch is started and somehow the information about which migrations have run is lost leading to not executing the migrations depending on the already executed ones.

The drush messages:

Running d6_migration_A [ok]
Memory usage is 878.22 MB (86% of limit 1 GB), reclaiming memory. [warning]
Memory usage is now 859.06 MB (84% of limit 1 GB), not enough reclaimed, starting new batch [warning]
Processed 334 items (295 created, 0 updated, 0 failed, 39 ignored) - done with 'd6_migration_A' [status]
Running d6_migration_B [ok]
Migration d6_migration_B did not meet the requirements. Missing migrations d6_migration_A. requirements: d6_migration_A.

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

none

API changes

none