Skip to content
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

Remove CIVICRM_SUPPORT_MULTIPLE_LOCKS and make it always enabled if available #15604

Merged
merged 1 commit into from
Oct 25, 2019

Conversation

mattwire
Copy link
Contributor

Overview

This is in use on all my production sites, @eileenmcnaughton uses it and I believe others do as well. Adding the define was just to be really careful in case it could cause any issues - but it's been there a year now and time to go.

Before

You have to enable the CIVICRM_SUPPORT_MULTIPLE_LOCKS define to use multiple locks on modern versions of MySQL/MariaDB.

After

Multiple locks used by default - so less sites fall over when sending mailings.

Technical Details

Comments

@eileenmcnaughton @seamuslee001 per comments on #15588

@civibot
Copy link

civibot bot commented Oct 25, 2019

(Standard links)

@civibot civibot bot added the master label Oct 25, 2019
@eileenmcnaughton
Copy link
Contributor

Test fail is unrelated. As Matt says we have been successfully using this in production & discussed removing it now that it has been tested. Merging

@eileenmcnaughton eileenmcnaughton merged commit c01d967 into civicrm:master Oct 25, 2019
@mfb
Copy link
Contributor

mfb commented Nov 4, 2019

I have a site using multiple locks on MySQL 5.6 via custom lock subsystem. The supportsMultipleLocks() method is only used by CRM/Core/Lock.php so it's fine if it returns incorrect info, since nothing will be calling it. I guess we could assume no extensions call this method either.

@eileenmcnaughton
Copy link
Contributor

I suspect extensions don't acquire locks very much but that they should do it more. Still it won't affect mysql 5.6 because there is a version compare in there too

@mfb
Copy link
Contributor

mfb commented Nov 4, 2019

I suspect extensions don't acquire locks very much but that they should do it more. Still it won't affect mysql 5.6 because there is a version compare in there too

Not sure what you mean - what I'm saying is my custom lock does support locks on MySQL 5.6 but there's no way to say so. But I don't think this matters, assuming the only code using this method is the built-in lock, which I'm not using. It's just a bit confusing because this code is CRM_Utils_SQL so theoretically some other code could call it.

@eileenmcnaughton
Copy link
Contributor

Well hopefully extensions aren't using CRM_Utils_SQL & are using the api instead. If they access core functions directly all bets are off

@mfb
Copy link
Contributor

mfb commented Nov 4, 2019

ok I thought maybe CRM_Utils_SQL is the api and extensions could call something like CRM_Utils_SQL::supportsFullGroupBy()

@eileenmcnaughton
Copy link
Contributor

Hmm - it's not really intended to be the api although as an extension writer I'd take a risk on calling that function in tested code I would understand it's clearly an 'own-risk' thing to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants