-
Notifications
You must be signed in to change notification settings - Fork 171
Issue #317156 by navneet0693: Moved logic from activity_creator_update_8802 to hook_post_update_name and refactored. #1986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tbkot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Also, I've checked it on local and all ok.
ribel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested the latest OS 9.2 with this patch and all updates went well.
|
@ronaldtebrake I think it would be good to merge this, and maybe even do a new release, what do you think? |
|
Thanks for notifying me, think it's a good idea indeed. |
|
I request to hold on for merging. I am facing memory outage issues when dataset is above 1000K. |
114a1b0 to
81b161c
Compare
|
Looks I found the issue I was facing. It's related to drush:
As Berdir says in drush-ops/drush#3117 (comment). resetCache() was also not sufficient enough to solve our problem. |
…date_8802 to hook_post_update_name and refactored.
…m 10,000 to 5,000.
…he after entity load.
ceeaf07 to
6a31729
Compare
|
I have create a new PR #1988 with different approach. |
|
PR #1988 is being chosen in favor of this one, so closed. |
Problem
Originating PR: #1965
When upgrading OpenSocial from 8.4 to 8.5,
drush updbfails due to https://github.com/goalgorilla/open_social/blob/10.0.x/modules/custom/activity_creator/activity_creator.install#L146The better place for any such entity updates is hook_post_update_name, also as documentation of hook_update_N states:
Also, https://github.com/goalgorilla/open_social/blob/10.0.x/modules/custom/activity_creator/activity_creator.install#L163 is increasing the range of query exponentially.
Definition of range function:
Also, as @Kingdutch noted that this update could skip certain ids to be processed as it is reading https://github.com/goalgorilla/open_social/blob/10.0.x/modules/custom/activity_creator/activity_creator.install#L160 and deleting ids https://github.com/goalgorilla/open_social/blob/10.0.x/modules/custom/activity_creator/activity_creator.install#L187 from the same table.
Solution
Issue tracker
https://www.drupal.org/project/social/issues/3171563
How to test
Screenshots
N.A
Release notes
Logic from activity_creator_update_8802() moved to activity_creator_post_update_8802_remove_activities_with_no_related_entities()
Change Record
Resolved a problem of memory outage on upgrade by moving logic from activity_creator_update_8802() moved to activity_creator_post_update_8802_remove_activities_with_no_related_entities()
Translations
N.A