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

When a database table column is updated, detect automatically whether it's a major upgrade or not #10629

Open
mattab opened this issue Oct 2, 2016 · 2 comments
Labels
c: Performance For when we could improve the performance / speed of Matomo. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@mattab
Copy link
Member

mattab commented Oct 2, 2016

When one changes the schema of a column within the Column object, we will currently automatically trigger a database upgrade. The goal of this issue is to also display our "Major database upgrade" warning in the UI, when such column upgrade applies to any of the log_* table.

Follows up #10028

It's useful because:

  • schema updates on log_* tables can take hours on big piwik servers, causing pain if the user does not run it via console command
  • developers will forget to set a isMajorUpdate flag on their database
  • because we can quite easily automatically detect whether a DB schema upgrade will be "huge", we should do it
@mattab mattab added this to the 3.0.0 milestone Oct 2, 2016
@mattab mattab added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. c: Performance For when we could improve the performance / speed of Matomo. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. labels Oct 2, 2016
@mattab
Copy link
Member Author

mattab commented Oct 2, 2016

Setting the isMajorUpdate flag will currently display the following warning in the UI:

db warning

and in the console command:

console command

@gaumondp
Copy link

gaumondp commented Oct 3, 2016

I always use the console for my update so my comment is not for me. Maybe you should give a hint about what is a "large installation".

Ex:
"The following advice is especially important for large (more than 50 000 page views a day) installations."

Or read the DB size to emphasize the time it will take. "Large" could be DB> 2 GB. I don't know what is really considered large anyway...

FYI, my "worst" update was 36 minutes for 15 GB of data (Piwik 2.7 to 2.10) on a dedicated MySQL server. And I got 125k pageviews a day these days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
3 participants