D7 Comments to d8/d9 migration fails to migrate comments with the same created datetime when batch_size is added.

Created on 31 May 2022, over 2 years ago
Updated 18 July 2024, 5 months ago

Problem/Motivation

When we have a d7 to d8/d9 comment migration where the created datetime is repeated, and we set a batch_size, migrate adds a range to the query that gets the source data. Apparently, that query is also orded by created property, and this makes the range not able to manage which entities with an identical created datetime have been migrated and which have not.

Steps to reproduce

- Build a d7 to d9 comment migration, where some of the source comments have the exact same 'created' property.
- Add an small batch_size to the migration yml.
- Launch the migration and check if all comments where migrated or not.
- If it fails, you should see that some comments are still in the Unprocessed column.

Proposed resolution

Change the query orderBy from created to cid. In this way we respect the primary key, and also we do not suffer from the problem of ranges in the queries. Furthermore, ordering the comments by cid seems more coherent and correct.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
MigrationΒ  β†’

Last updated 3 days ago

Created by

πŸ‡ͺπŸ‡ΈSpain Juanjol Navarra

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024