Currently using migrate tools to work on a rather complex migration. Profiles come in, and some of the data creates paragraphs, and some of those paragraphs go onwards to generate group content. Deletion is just as complex. Remove a node, remove paragraphs, remove paragraphs, remove group content.

With 1059 records (a sample of the full amount we have to migrate) whenever I run migrate currently I get a 504 bad gateway response. The rollback runs partially through the records to remove, but ultimately times out. Updating this to using a batch process would be helpful.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jnicola created an issue. See original summary.

kiseleva.t’s picture

Version: 8.x-4.0 » 8.x-5.0
Status: Active » Needs review
StatusFileSize
new8.1 KB

Implemented batch for rollback (for version 8.x-5.0), for now, made it configurable by a checkbox in "Additional execution options".

vasike’s picture

Version: 8.x-5.0 » 8.x-5.x-dev
StatusFileSize
new8.4 KB
new8.73 KB

There 2 re-rolls for this ... one for 5.x and the other for 6.0.x

it's @kiseleva.t code ... nothing new added by me.

anybody’s picture

Version: 8.x-5.x-dev » 6.0.x-dev

Updating to latest version, where development mainly happens. #3 already contains a patch against that version.

acidaniel’s picture

It is possible to use drush to pass any `--batch_size` option, I can't see this is something defined here Incorporating that option will be AMAZING!

heddn’s picture

Status: Needs review » Needs work

Can we just always use a batch for rollback? I can't think of a reason to use the old way when batch is better.

anybody’s picture

Totally agree with #6!

@kiseleva.t was there a technical reason for the checkbox / option? Or just to let the user decide and make the switch more soft?

vasike’s picture

Status: Needs work » Needs review

i created a MR from the previous patches ... replacing the rollback with batch rollback.

Maybe some code could be cleanup ... so anyone that wants to. help, please update the MR ...

jaypan’s picture

Priority: Normal » Major

I've confirmed this is working, and it is actually essential for me as my system times out and rollbacks are impossible when they are not done through a batch. I'm marking this as major, as this bug prevents module functionality for me.

ovanes’s picture

I have rerolled the patch for version 6.0.x

ygstnd’s picture

I updated the patch added in comment #11
Deleted the not needed "sprintf('%s::%s', static::class, 'batchProcessImport')" which was breaking Migration Batch execution

heddn’s picture

Status: Needs review » Needs work

This could use a re-base and review if everything is in the MR.