In votingapi_update_8302(), every vote is retrieved from the table before operating on them one by one. This can easily exhaust the allowed memory for PHP if you have large numbers of votes. Any update hook that might operate on many items should make use of the sandbox to iterate progressively through the dataset.

Comments

kevin.dutra created an issue. See original summary.

kevin.dutra’s picture

Assigned: kevin.dutra » Unassigned
Status: Active » Needs review
StatusFileSize
new1.11 KB
tr’s picture

StatusFileSize
new1.99 KB

Testing output shows some coding standards problems - no need to introduce new problems with the patch, and there are only a few other problems in that file that are easy to clean up while we're at it. This is a re-roll with only those coding standards fixes added - no functional changes were made.

I've looked at the code and compared it with similar code that I know is working and it looks good to me. I HAVEN'T tested an actual update because I don't have an old database to test it on - a manual test should be done at least once to verify that the code actually runs.

pifagor’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
mrinalini9’s picture

Assigned: Unassigned » mrinalini9
mrinalini9’s picture

Assigned: mrinalini9 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.87 KB

Rerolled patch #3, please review.

tr’s picture

Status: Needs review » Closed (outdated)