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

CRM-21298 System check: bypass missing indices check until update indices works #11250

Merged
merged 1 commit into from
Dec 2, 2017

Conversation

agh1
Copy link
Contributor

@agh1 agh1 commented Nov 7, 2017

Overview

The "Performance warning: Missing indices" system check should be bypassed until the "Update Indices" task works reliably.

This is the same as #11114 but for master.

Before

Users of many sites (including as one example a demo site where 4.7.17 was installed and then upgraded to 4.7.25) are presented with a WARNING level message in the system check stating that they have missing indices. An Update Indices button is in the message. Clicking the button (for many sites) causes a database error as documented in CRM-20817.

After

The system check will never produce the "Performance warning: Missing indices" message.

Technical Details

I left all the code in there to run the check and update the indices. The checkIndices() function just returns an empty array before getting to that point. This allows for easy removal for testing and when the update tool is actually reliable.


@eileenmcnaughton
Copy link
Contributor

I'm ok with merging this since it has caused issues. Note that we are in a bind now though. We have no clear analysis as to which sorts of indexes are still causing problems, given that @jitendrapurohit worked to fix this & appears to have fixed some but not 100% of them (but presumably all those that affect his customers). So I don't think there is enough clear information to fix the remaining bugs once we merge this.

This is our main method now to add indexes in upgrades (and it would be bad for that to change) so we are kind of in a 'don't add any new indexes' pattern now. (or do but don't expect them to be changed on existing installs since they won't know)

@eileenmcnaughton eileenmcnaughton added merge ready PR will be merged after a few days if there are no objections and removed merge on pass labels Nov 8, 2017
@eileenmcnaughton
Copy link
Contributor

I just changed the tag from merge ready to merge on pass since I guess other people might want to chime in before it's merged

@agh1
Copy link
Contributor Author

agh1 commented Nov 9, 2017

@eileenmcnaughton I hope that this is a very short-term measure, and maybe a fix could be done in the course of the 4.7.29 cycle. I actually don't know anything about any of the considerations under the hood on the "update indices" process, and I suspect that most users, implementors, and developers don't either.

I think that's why we resent it so much: the experience is that CiviCRM was doing just fine, and then all of a sudden after an upgrade ⚠️ Warning! ⚠️ you have missing indices. When we try to be responsible and take care of it, we get the fatal error. The implication is that CiviCRM has something terribly wrong that can't be fixed, and the next thought is which database system should we move to because clearly CiviCRM is irretrievably broken.

We all on here know that's not the case, but most CiviCRM users aren't working with a partner, let alone one who follows changes in the code. That's why I'm of the mind that this is so urgent.

@clnlf
Copy link
Contributor

clnlf commented Nov 22, 2017

Being hyperaware about CiviCRM can be a good thing in some instances like this one.

I, for one, can appreciate a notice from Civi about missing indices. As long as this pull request doesn't completely suppress the notice from, say, the civi status page..

@eileenmcnaughton
Copy link
Contributor

@clnlf It will completely suppress the notice. I haven't been able to bring myself to merge this without putting aside a day to do proper analysis on what remaining issues remain with running the script - but I'm open to another merger merging it.

@colemanw colemanw merged commit e71e908 into civicrm:master Dec 2, 2017
@colemanw
Copy link
Member

colemanw commented Dec 2, 2017

Ok if we are still getting fatal errors from the fix indexes tool then we should merge this for now. I share the hope that this is only a temp fix.

@eileenmcnaughton
Copy link
Contributor

Note that @aydun has done an analysis on this. #10415

sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-21298 System check: bypass missing indices check until update indices works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master merge ready PR will be merged after a few days if there are no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants