-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
dev-core-166/lessen memory impact #12306
Conversation
(Standard links)
|
Thanks @JO0st. |
I would love to add some tests, but have two problems to do so:
|
@JO0st I'm not requesting a performance test, just a test of the function to ensure that the same result set is returned before and after. |
@JO0st @colemanw @eileenmcnaughton I have added more tests for the process_membership job in #12918 & #12927 and tested with & without this PR. All tests passed before & after. Looking at the code changes, I wondered if the behaviour could differ for memberships inherited between individuals (e.g. parent-child) when one party dies, however I have not found any differences in behaviour in manual testing of this. The unit tests include checking inherited memberships, though not the inherited/deceased case.* As an aside, I wasn't sure that Civi's current behaviour when a primary member dies is (morally) right: the inherited memberships are marked as deceased. Discussed at #12918.
|
@davejenx is this 'ready to merge' in your opinion? |
I marked 'has-test' as tests were merged separately |
@eileenmcnaughton Yes, I think so. |
woot! |
Are you aware that this change has an implied change in logic? The old code checked for
while the new code moved that into SQL as
and
But, at least in our setup, we have three values in this column:
and
respectively. Could anyone confirm this? |
@bjendres Yes, I think there was a subsequent PR addressing this, will try to find a reference... Here are the later commits: Issue & PR: |
We possibly should have targetted the rc for 881 - but it will be in the June release. @seamuslee001 @totten should we drop a 5.13 for 881? |
Thanks @davejenx, I hadn't seen that. Wrt the release of 881: I'll start patching my clients' systems right away, but for other people it might be good to get this out asap, since it fails without error message - it simply doesn't change the status of some memberships any more.... |
Yep - we are looking at putting out a patch release with this & another change - product-mtce chat channel is the place to discuss |
Thanks, @eileenmcnaughton |
Overview
Making shure the job to update membership statuses can cope with large numbers of memberships
Before
The updateallmembershipstatus runs out of memory when processing large numbers of memberships.
After
updateallmemberships uses less memory
Technical Details
Instead of getting all memberships in memory and filtering them there to process only the relevant ones the filtering is done by altering the query before getting the memberships from the database.
Comments