- Issue created by @mikelutz
- 🇺🇸United States mikelutz Michigan, USA
mikelutz → changed the visibility of the branch 3463800-allow-batchsize-to to hidden.
- Status changed to Needs work
about 1 year ago 1:52pm 28 August 2024 - 🇳🇮Nicaragua dinarcon
Thanks for working on this. I tested the MR and I got a never ending migration, processing the same records over and over. I think that is caused because reading the highwater value to add the condition to the query only happens in the first run of the batch inside an
if ($this->batch == 0)condition.The very first time that I run the migration, the highwater has not been set. So, the code from the MR keeps returning a query with
LIMIT [BATCH_SIZE] OFFSET 0. Subsequent callsinitializeIteratoralready have$this->batchgreater than 0 so the code to add the highwater is never reached.If I force the migration to stop and run it again, the highwater condition is set, but it is never updated in subsequent calls
initializeIteratorbecause of the same reason.For this to work, I think the code that sets the highwater condition needs to be moved outside the
if ($this->batch == 0)condition.