-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Allow invalidated archive data to be used until they are re-processed #6116
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
Allow invalidated archive data to be used until they are re-processed #6116
Conversation
ref #5932 |
This is a small part of the code that shows how I plan to achieve the goal: ArchiveSelector loads the invalidated data only if archiver will not be triggered in the current request. Thanks to that if archiver can be run it re-processes the data and if not it loads the invalidated ones. Left to be done:
|
@mattab please check this PR. It should be ready to merge |
foreach ($archiveTables as $archiveTable) { | ||
$query = ' | ||
SELECT t1.idarchive FROM `' . $archiveTable . '` t1 | ||
INNER JOIN `piwik_archive_numeric_2014_09` t2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table month is hardcoded here: piwik_archive_numeric_2014_09
@mkurzeja Nice work, I put feedback inline, looking forward to being able to merge it! |
… changed purge invaldiated data task priority
@mattab Thanks for the review. I've introduced some changes and updated to the current master. |
…lidate-archived-reports
INNER JOIN `' . $archiveTable . '` t2 | ||
ON t1.name = t2.name AND t1.idsite=t2.idsite | ||
AND t1.date1=t2.date1 AND t1.date2=t2.date2 AND t1.period=t2.period | ||
WHERE t1.value = 4 AND t2.value IN(' . ArchiveWriter::DONE_OK . ', ' . ArchiveWriter::DONE_OK_TEMPORARY . ') AND t1.name LIKE \'done%\''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
magic number 4 should be using the const
public function testAnotherApi($api, $params) | ||
{ | ||
$this->setBrowserArchivingTriggering(1); | ||
$this->invalidateTestArchives(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this line can be removed as it's already called before in testSameApi
Nice. Besides review above, the tests are easy to read and understand! Well done, looking forward to merge it. |
@mattab Thanks for the review. I've added all changes and updated to the current master |
…ed-reports fixes #5932 Allow invalidated archive data to be used until they are re-processed
Kuddos @mkurzeja for this nicely done Pull request and big usability improvement to Piwik users who will now enjoy reports filled with data until the reports will be re-processed. 👍 |
…idateArchivedReports refs #6116
Added DONE_INVALIDATED flag to archiving and considering it when fetching archives