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

Refs #7181, add --include-year-archives and --force-optimize-tables options to purge-old-archive-data command. #7594

Merged
merged 1 commit into from Mar 31, 2015

Conversation

diosmosis
Copy link
Member

First option includes january archive tables for dates supplied and second option forces table optimization even on InnoDB. Add parameter to Db::optimizeTables to force issuing a query.

Refs #7181

…ptions to purge-old-archive-data command. First option includes january archive tables for dates supplied and second option forces table optimization even on InnoDB. Add parameter to Db::optimizeTables to force issuing a query.
@diosmosis diosmosis added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Mar 31, 2015
@diosmosis diosmosis added this to the Piwik 2.13.0 milestone Mar 31, 2015
diosmosis added a commit that referenced this pull request Mar 31, 2015
Refs #7181, add --include-year-archives and --force-optimize-tables options to purge-old-archive-data command. First option includes january archive tables for dates supplied and second option forces table optimization even on InnoDB. Add parameter to Db::optimizeTables to force issuing a query.
@diosmosis diosmosis merged commit f1af7c1 into master Mar 31, 2015
@diosmosis diosmosis deleted the purge_command_additions branch March 31, 2015 23:00
@diosmosis diosmosis restored the purge_command_additions branch March 31, 2015 23:00
@@ -58,6 +58,8 @@ protected function configure()
$this->addOption('exclude-invalidated', null, InputOption::VALUE_NONE, "Do not purge invalidated archive data.");
$this->addOption('exclude-ranges', null, InputOption::VALUE_NONE, "Do not purge custom ranges.");
$this->addOption('skip-optimize-tables', null, InputOption::VALUE_NONE, "Do not run OPTIMIZE TABLES query on affected archive tables.");
$this->addOption('include-year-archives', null, InputOption::VALUE_NONE, "If supplied, the command will purge archive tables that contain year archives for every supplied date.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking that this should be the default, ie. always purge year archives for supplied dates. Is there a reason not to do this all the time?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be confusing to the user if the january month ends up always being included.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we care most about doing the correct thing - why would it be confusing to user to purge yearly archives? it seems to be implementation detail

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User runs core:purge-old-archive-data 2012-01-03 it purges 2012_03 and 2012_01. This is unexpected.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of the command is to provide precision control for maintenance, it is not a one-click feature for end-users.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'm not sure i'm getting it. I thought that if users have to manually purge year archives, it means the archive purger is not doing the job of purging year archives "automatically". so if we need this parameter in the console, I thought that the Scheduled Task itself which does not have this option, wouldn't properly invalidate yearly archives. But maybe i'm missing something so i may be wrong!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For temporary archive purging, the scheduled task goes through every archive table, so year archives are affected.

For invalidated archive purging, the scheduled task uses the ArchivesToPurgeDistributedList, so if the year archive is invalidated correctly, the year table should get purged. I'm not very familiar w/ the invalidation code, though, just purging.

@mnapoli mnapoli deleted the purge_command_additions branch April 9, 2015 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants