Review main Abandoned

72243[BUGFIX] Reduce memory usage in row updater

Sybille Peters CR 0 V 0 Hard +250 −57 updated 12/03/21, 09:44

Commit message

Previously, DatabaseRowsUpdateWizard fetched all rows for each table.
This could result in out of memory situations for a large number of
records if the fetched content exceeded the available memory limit
for PHP.

The database records are now fetched in chunks of 1000. Exact
calculations for available memory and required memory for each
row are difficult, but it is now much less likely that
a memory limit is reached.

If the row updater upgrade wizard does abort, it is possible to
resume by calling the row updater again. For this reason, the
current table and uid were stored in the registry. This way it
is possible for the row updater to resume (roughly) where he left
off. This was already the case before the patch and has not changed.

Reasons for aborting may be max execution time or (still) memory
limit (though the memory limit problem is now less likely).

Additionally, this patch adds tests to check the new behaviour.

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 5