diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-09-21 01:30:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 01:30:00 +0300 |
commit | 1cb41a757e96e5a0c19da9a0deaad7dc5593c759 (patch) | |
tree | cb81217f03514dab2ac9ffc3e229d46bd3d93286 | |
parent | 62fcad39c4f0c5d8c0d75b2456a4ac07f7b106a5 (diff) |
Add extra check for queue consumer to prevent duplicates and add duplicate check in tests. (#16406)
23 files changed, 508 insertions, 325 deletions
diff --git a/core/Archive/ArchiveInvalidator.php b/core/Archive/ArchiveInvalidator.php index 5576d78fac..164ff86116 100644 --- a/core/Archive/ArchiveInvalidator.php +++ b/core/Archive/ArchiveInvalidator.php @@ -337,7 +337,7 @@ class ArchiveInvalidator private function getAllPeriodsByYearMonth($periodOrAll, $dates, $cascadeDown, &$result = []) { - $periods = $periodOrAll ? [$periodOrAll] : ['day', 'week', 'month', 'year']; + $periods = $periodOrAll ? [$periodOrAll] : ['day']; foreach ($periods as $period) { foreach ($dates as $date) { $periodObj = $this->makePeriod($date, $period); diff --git a/core/CronArchive.php b/core/CronArchive.php index 6533e6d6ce..9dbaa59134 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -344,9 +344,6 @@ class CronArchive $queueConsumer = new QueueConsumer($this->logger, $this->websiteIdArchiveList, $countOfProcesses, $pid, $this->model, $this->segmentArchiving, $this, $this->cliMultiRequestParser, $this->archiveFilter); - // invalidate once at the start no matter when the last invalidation occurred - $this->invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain(); - while (true) { if ($this->isMaintenanceModeEnabled()) { $this->logger->info("Archiving will stop now because maintenance mode is enabled"); @@ -736,8 +733,13 @@ class CronArchive return CoreAdminHomeAPI::getInstance(); } - public function invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain() + public function invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain($idSiteToInvalidate) { + if ($this->model->isInvalidationsScheduledForSite($idSiteToInvalidate)) { + $this->logger->debug("Invalidations currently exist for idSite $idSiteToInvalidate, skipping invalidating for now..."); + return; + } + $this->logger->info("Checking for queued invalidations..."); // invalidate remembered site/day pairs @@ -752,6 +754,10 @@ class CronArchive $siteIdsToInvalidate = []; foreach ($siteIds as $idSite) { + if ($idSite != $idSiteToInvalidate) { + continue; + } + $params = new Parameters(new Site($idSite), $period, new Segment('', [$idSite], $period->getDateStart(), $period->getDateEnd())); if ($this->isThereExistingValidPeriod($params)) { $this->logger->info(' Found usable archive for date range {date} for site {idSite}, skipping invalidation for now.', ['date' => $date, 'idSite' => $idSite]); @@ -761,6 +767,10 @@ class CronArchive $siteIdsToInvalidate[] = $idSite; } + if (empty($siteIdsToInvalidate)) { + continue; + } + $listSiteIds = implode(',', $siteIdsToInvalidate); try { @@ -776,56 +786,52 @@ class CronArchive } // invalidate today if needed for all websites - $this->invalidateRecentDate('today'); + $this->invalidateRecentDate('today', $idSiteToInvalidate); // invalidate yesterday archive if the time of the latest valid archive is earlier than today // (means the day has changed and there might be more visits that weren't processed) - $this->invalidateRecentDate('yesterday'); + $this->invalidateRecentDate('yesterday', $idSiteToInvalidate); // invalidate range archives - foreach ($this->allWebsites as $idSite) { - $dates = $this->getCustomDateRangeToPreProcess($idSite); - - foreach ($dates as $date) { - try { - $period = PeriodFactory::build('range', $date); - } catch (\Exception $ex) { - $this->logger->debug(" Found invalid range date in [General] archiving_custom_ranges: {date}", ['date' => $date]); - continue; - } - - $params = new Parameters(new Site($idSite), $period, new Segment('', [$idSite], $period->getDateStart(), $period->getDateEnd())); - if ($this->isThereExistingValidPeriod($params)) { - $this->logger->info(' Found usable archive for custom date range {date} for site {idSite}, skipping archiving.', ['date' => $date, 'idSite' => $idSite]); - continue; - } + $dates = $this->getCustomDateRangeToPreProcess($idSiteToInvalidate); - $this->logger->info(' Invalidating custom date range ({date}) for site {idSite}', ['idSite' => $idSite, 'date' => $date]); + foreach ($dates as $date) { + try { + $period = PeriodFactory::build('range', $date); + } catch (\Exception $ex) { + $this->logger->debug(" Found invalid range date in [General] archiving_custom_ranges: {date}", ['date' => $date]); + continue; + } - $this->getApiToInvalidateArchivedReport()->invalidateArchivedReports($idSite, [$date], 'range', $segment = null, $cascadeDown = false, $_forceInvalidateNonexistant = true); + $params = new Parameters(new Site($idSiteToInvalidate), $period, new Segment('', [$idSiteToInvalidate], $period->getDateStart(), $period->getDateEnd())); + if ($this->isThereExistingValidPeriod($params)) { + $this->logger->info(' Found usable archive for custom date range {date} for site {idSite}, skipping archiving.', ['date' => $date, 'idSite' => $idSiteToInvalidate]); + continue; } + + $this->logger->info(' Invalidating custom date range ({date}) for site {idSite}', ['idSite' => $idSiteToInvalidate, 'date' => $date]); + + $this->getApiToInvalidateArchivedReport()->invalidateArchivedReports($idSiteToInvalidate, [$date], 'range', $segment = null, $cascadeDown = false, $_forceInvalidateNonexistant = true); } // for new segments, invalidate past dates - foreach ($this->allWebsites as $idSite) { - $segmentDatesToInvalidate = $this->segmentArchiving->getSegmentArchivesToInvalidateForNewSegments($idSite); + $segmentDatesToInvalidate = $this->segmentArchiving->getSegmentArchivesToInvalidateForNewSegments($idSiteToInvalidate); - foreach ($segmentDatesToInvalidate as $info) { - $this->logger->info(' Segment "{segment}" was created or changed recently and will therefore archive today (for site ID = {idSite})', [ - 'segment' => $info['segment'], - 'idSite' => $idSite, - ]); + foreach ($segmentDatesToInvalidate as $info) { + $this->logger->info(' Segment "{segment}" was created or changed recently and will therefore archive today (for site ID = {idSite})', [ + 'segment' => $info['segment'], + 'idSite' => $idSiteToInvalidate, + ]); - $earliestDate = $info['date']; + $earliestDate = $info['date']; - $allDates = PeriodFactory::build('range', $earliestDate . ',today')->getSubperiods(); - $allDates = array_map(function (Period $p) { - return $p->getDateStart()->toString(); - }, $allDates); - $allDates = implode(',', $allDates); + $allDates = PeriodFactory::build('range', $earliestDate . ',today')->getSubperiods(); + $allDates = array_map(function (Period $p) { + return $p->getDateStart()->toString(); + }, $allDates); + $allDates = implode(',', $allDates); - $this->getApiToInvalidateArchivedReport()->invalidateArchivedReports($idSite, $allDates, $period = false, $info['segment']); - } + $this->getApiToInvalidateArchivedReport()->invalidateArchivedReports($idSiteToInvalidate, $allDates, $period = false, $info['segment']); } $this->setInvalidationTime(); @@ -833,32 +839,31 @@ class CronArchive $this->logger->info("Done invalidating"); } - private function invalidateRecentDate($dateStr) + private function invalidateRecentDate($dateStr, $idSite) { $isYesterday = $dateStr == 'yesterday'; - foreach ($this->allWebsites as $idSite) { - $date = Date::factory($dateStr); - $period = PeriodFactory::build('day', $date); - - $params = new Parameters(new Site($idSite), $period, new Segment('', [$idSite], $period->getDateStart(), $period->getDateEnd())); - if ($this->isThereExistingValidPeriod($params, $isYesterday)) { - $this->logger->debug(" Found existing valid archive for $dateStr, skipping invalidation..."); - continue; - } - $loader = new Loader($params); - if ($loader->canSkipThisArchive()) { - $this->logger->debug(" " . ucfirst($dateStr) . " archive can be skipped due to no visits for idSite = $idSite, skipping invalidation..."); - continue; - } + $date = Date::factory($dateStr); + $period = PeriodFactory::build('day', $date); - $this->logger->info(" Will invalidate archived reports for $dateStr in site ID = {idSite}'s timezone ({date}).", [ - 'idSite' => $idSite, - 'date' => $date->getDatetime(), - ]); + $params = new Parameters(new Site($idSite), $period, new Segment('', [$idSite], $period->getDateStart(), $period->getDateEnd())); + if ($this->isThereExistingValidPeriod($params, $isYesterday)) { + $this->logger->debug(" Found existing valid archive for $dateStr, skipping invalidation..."); + return; + } - $this->getApiToInvalidateArchivedReport()->invalidateArchivedReports($idSite, $date->toString(), 'day'); + $loader = new Loader($params); + if ($loader->canSkipThisArchive()) { + $this->logger->debug(" " . ucfirst($dateStr) . " archive can be skipped due to no visits for idSite = $idSite, skipping invalidation..."); + return; } + + $this->logger->info(" Will invalidate archived reports for $dateStr in site ID = {idSite}'s timezone ({date}).", [ + 'idSite' => $idSite, + 'date' => $date->getDatetime(), + ]); + + $this->getApiToInvalidateArchivedReport()->invalidateArchivedReports($idSite, $date->toString(), 'day'); } public function isThereExistingValidPeriod(Parameters $params, $isYesterday = false) diff --git a/core/CronArchive/QueueConsumer.php b/core/CronArchive/QueueConsumer.php index 4af3afbb7c..bba7ebb474 100644 --- a/core/CronArchive/QueueConsumer.php +++ b/core/CronArchive/QueueConsumer.php @@ -153,6 +153,11 @@ class QueueConsumer $this->siteRequests = 0; } + // check if we need to process invalidations + // NOTE: we do this on every iteration so we don't end up processing say a single user entered invalidation, + // and then stop until the next hour. + $this->cronArchive->invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain($this->idSite); + // we don't want to invalidate different periods together or segment archives w/ no-segment archives // together, but it's possible to end up querying these archives. if we find one, we keep track of it // in this array to exclude, but after we run the current batch, we reset the array so we'll still @@ -186,15 +191,6 @@ class QueueConsumer continue; } - if ($this->hasDifferentDoneFlagType($archivesToProcess, $invalidatedArchive['name'])) { - $this->logger->debug("Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: $invalidationDesc"); - - $idinvalidation = $invalidatedArchive['idinvalidation']; - $invalidationsToExcludeInBatch[$idinvalidation] = true; - - continue; - } - if ($invalidatedArchive['segment'] === null) { $this->logger->debug("Found archive for segment that is not auto archived, ignoring: $invalidationDesc"); $this->addInvalidationToExclude($invalidatedArchive); @@ -208,6 +204,13 @@ class QueueConsumer continue; } + if ($this->model->isSimilarArchiveInProgress($invalidatedArchive)) { + $this->logger->debug("Found duplicate invalidated archive (same archive currently in progress), ignoring: $invalidationDesc"); + $this->addInvalidationToExclude($invalidatedArchive); + $this->model->deleteInvalidations([$invalidatedArchive]); + continue; + } + if ($this->hasIntersectingPeriod($archivesToProcess, $invalidatedArchive)) { $this->logger->debug("Found archive with intersecting period with others in concurrent batch, skipping until next batch: $invalidationDesc"); @@ -229,6 +232,18 @@ class QueueConsumer continue; } + $alreadyInProgressId = $this->model->isArchiveAlreadyInProgress($invalidatedArchive); + if ($alreadyInProgressId) { + $this->addInvalidationToExclude($invalidatedArchive); + if ($alreadyInProgressId < $invalidatedArchive['idinvalidation']) { + $this->logger->debug("Skipping invalidated archive {$invalidatedArchive['idinvalidation']}, invalidation already in progress. Since in progress is older, not removing invalidation."); + } else if ($alreadyInProgressId > $invalidatedArchive['idinvalidation']) { + $this->logger->debug("Skipping invalidated archive {$invalidatedArchive['idinvalidation']}, invalidation already in progress. Since in progress is newer, will remove invalidation."); + $this->model->deleteInvalidations([$invalidatedArchive['idinvalidation']]); + } + continue; + } + if ($this->canSkipArchiveBecauseNoPoint($invalidatedArchive)) { $this->logger->debug("Found invalidated archive we can skip (no visits): $invalidationDesc"); $this->addInvalidationToExclude($invalidatedArchive); @@ -308,13 +323,6 @@ class QueueConsumer private function getNextInvalidatedArchive($idSite, $extraInvalidationsToIgnore) { - $lastInvalidationTime = CronArchive::getLastInvalidationTime(); - if (empty($lastInvalidationTime) - || (time() - $lastInvalidationTime) >= 3600 - ) { - $this->cronArchive->invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain(); - } - $iterations = 0; while ($iterations < 100) { $invalidationsToExclude = array_merge($this->invalidationsToExclude, $extraInvalidationsToIgnore); @@ -464,18 +472,6 @@ class QueueConsumer return $this->segmentArchiving->isAutoArchivingEnabledFor($storedSegment); } - private function hasDifferentDoneFlagType(array $archivesToProcess, $name) - { - if (empty($archivesToProcess)) { - return false; - } - - $existingDoneFlagType = $this->getDoneFlagType($archivesToProcess[0]['name']); - $newArchiveDoneFlagType = $this->getDoneFlagType($name); - - return $existingDoneFlagType != $newArchiveDoneFlagType; - } - private function getPluginNameForArchiveIfAny($archive) { $name = $archive['name']; diff --git a/core/DataAccess/Model.php b/core/DataAccess/Model.php index b623d7fc24..6115dc5dfa 100644 --- a/core/DataAccess/Model.php +++ b/core/DataAccess/Model.php @@ -652,9 +652,56 @@ class Model return false; // we couldn't claim the lock, archive is in progress } + // remove similar invalidations w/ lesser idinvalidation values + $bind = [ + $invalidation['idsite'], + $invalidation['period'], + $invalidation['date1'], + $invalidation['date2'], + $invalidation['name'], + ArchiveInvalidator::INVALIDATION_STATUS_IN_PROGRESS, + ]; + + if (empty($invalidation['report'])) { + $reportClause = "(report IS NULL OR report = '')"; + } else { + $reportClause = "report = ?"; + $bind[] = $invalidation['report']; + } + + $sql = "DELETE FROM " . Common::prefixTable('archive_invalidations') . " WHERE idinvalidation < ? AND idsite = ? AND " + . "date1 = ? AND date2 = ? AND `period` = ? AND `name` = ? AND $reportClause"; + Db::query($sql, $bind); + return true; } + public function isSimilarArchiveInProgress($invalidation) + { + $table = Common::prefixTable('archive_invalidations'); + + $bind = [ + $invalidation['idsite'], + $invalidation['period'], + $invalidation['date1'], + $invalidation['date2'], + $invalidation['name'], + ArchiveInvalidator::INVALIDATION_STATUS_IN_PROGRESS, + ]; + + if (empty($invalidation['report'])) { + $reportClause = "(report IS NULL OR report = '')"; + } else { + $reportClause = "report = ?"; + $bind[] = $invalidation['report']; + } + + $sql = "SELECT idinvalidation FROM `$table` WHERE idsite = ? AND `period` = ? AND date1 = ? AND date2 = ? AND `name` = ? AND `status` = ? AND $reportClause LIMIT 1"; + $result = Db::fetchOne($sql, $bind); + + return !empty($result); + } + /** * Gets the next invalidated archive that should be archived in a table. * @@ -678,7 +725,9 @@ class Model $sql .= " AND idinvalidation NOT IN (" . implode(',', $idInvalidationsToExclude) . ')'; } - $sql .= " ORDER BY date1 DESC, period ASC, CHAR_LENGTH(name) ASC, idinvalidation ASC"; + // NOTE: order here is very important to ensure we process lower period archives first, and general 'all' archives before + // segment archives, and so we use the latest idinvalidation + $sql .= " ORDER BY date1 DESC, period ASC, CHAR_LENGTH(name) ASC, idinvalidation DESC"; if ($useLimit) { $sql .= " LIMIT 1"; @@ -715,6 +764,30 @@ class Model Db::query($sql, [$idSite, 'done.' . $plugin, $report]); } + public function isArchiveAlreadyInProgress($invalidatedArchive) + { + $table = Common::prefixTable('archive_invalidations'); + + $bind = [ + $invalidatedArchive['idsite'], + $invalidatedArchive['date1'], + $invalidatedArchive['date2'], + $invalidatedArchive['period'], + $invalidatedArchive['name'], + ]; + + $reportClause = "(report = '' OR report IS NULL)"; + if (!empty($invalidatedArchive['report'])) { + $reportClause = "report = ?"; + $bind[] = $invalidatedArchive['report']; + } + + $sql = "SELECT MAX(idinvalidation) FROM `$table` WHERE idsite = ? AND date1 = ? AND date2 = ? AND `period` = ? AND `name` = ? AND status = 1 AND $reportClause"; + + $inProgressInvalidation = Db::fetchOne($sql, $bind); + return $inProgressInvalidation; + } + /** * Returns true if there is an archive that exists that can be used when aggregating an archive for $period. * @@ -762,4 +835,12 @@ class Model $sql = "DELETE a FROM `$table` a LEFT JOIN `$siteTable` s ON a.idsite = s.idsite WHERE s.idsite IS NULL"; Db::query($sql); } + + public function isInvalidationsScheduledForSite($idSite) + { + $table = Common::prefixTable('archive_invalidations'); + $sql = "SELECT idsite FROM `$table` WHERE idsite = ? LIMIT 1"; + $value = Db::fetchOne($sql, [(int) $idSite]); + return !empty($value); + } } diff --git a/plugins/CoreAdminHome/Tasks.php b/plugins/CoreAdminHome/Tasks.php index 9cccf23aba..eb76a8c6f0 100644 --- a/plugins/CoreAdminHome/Tasks.php +++ b/plugins/CoreAdminHome/Tasks.php @@ -112,8 +112,11 @@ class Tasks extends \Piwik\Plugin\Tasks return; } - $cronArchive = new CronArchive(); - $cronArchive->invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain(); + $idSites = Request::processRequest('SitesManager.getAllSitesId'); + foreach ($idSites as $idSite) { + $cronArchive = new CronArchive(); + $cronArchive->invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain($idSite); + } } private function scheduleTrackingCodeReminderChecks() diff --git a/plugins/CoreConsole/tests/System/ArchiveCronTest.php b/plugins/CoreConsole/tests/System/ArchiveCronTest.php index c0228b450e..db15ebba10 100644 --- a/plugins/CoreConsole/tests/System/ArchiveCronTest.php +++ b/plugins/CoreConsole/tests/System/ArchiveCronTest.php @@ -163,15 +163,8 @@ class ArchiveCronTest extends SystemTestCase $invalidator = StaticContainer::get(ArchiveInvalidator::class); $invalidator->markArchivesAsInvalidated([1], ['2007-04-05'], 'day', new Segment('', [1]), false, false, 'ExamplePlugin.ExamplePlugin_example_metric2'); - $sequence = new Sequence('ExamplePlugin_archiveCount'); - $beforeCount = $sequence->getCurrentId(); - $output = $this->runArchivePhpCron(['-vvv' => null]); - $afterCount = $sequence->getCurrentId(); - - $this->assertNotEquals($beforeCount, $afterCount, 'example plugin archiving was not triggered'); - $this->runApiTests('ExamplePlugin.getExampleArchivedMetric', [ 'idSite' => 'all', 'date' => '2007-04-05', diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_archive_php_cron_output.txt b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_archive_php_cron_output.txt index 81032bb1a7..c592c19adb 100644 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_archive_php_cron_output.txt +++ b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_archive_php_cron_output.txt @@ -10,86 +10,98 @@ try 'php archive.php --url=http://your.piwik/path' ------------------------------------------------------- -INFO [2020-07-06 21:59:34] 10307 --------------------------- -INFO [2020-07-06 21:59:34] 10307 INIT -INFO [2020-07-06 21:59:34] 10307 Running Matomo 4.0.0-b2 as Super User -INFO [2020-07-06 21:59:34] 10307 --------------------------- -INFO [2020-07-06 21:59:34] 10307 NOTES -INFO [2020-07-06 21:59:34] 10307 - If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Matomo UI > Settings > General Settings. -INFO [2020-07-06 21:59:34] 10307 See the doc at: https://matomo.org/docs/setup-auto-archiving/ -INFO [2020-07-06 21:59:34] 10307 - Async process archiving supported, using CliMulti. -INFO [2020-07-06 21:59:34] 10307 - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings. -INFO [2020-07-06 21:59:34] 10307 --------------------------- -INFO [2020-07-06 21:59:34] 10307 START -INFO [2020-07-06 21:59:34] 10307 Starting Matomo reports archiving... -INFO [2020-07-06 21:59:34] 10307 Checking for queued invalidations... -INFO [2020-07-06 21:59:34] 10307 Will invalidate archived reports for 2014-03-13 for following websites ids: 1,3 -INFO [2020-07-06 21:59:34] 10307 Will invalidate archived reports for 2014-03-12 for following websites ids: 3,1 -INFO [2020-07-06 21:59:34] 10307 Will invalidate archived reports for 2012-09-30 for following websites ids: 1 -INFO [2020-07-06 21:59:34] 10307 Will invalidate archived reports for 2012-08-19 for following websites ids: 1 -INFO [2020-07-06 21:59:34] 10307 Will invalidate archived reports for 2012-08-15 for following websites ids: 2,1,3 -INFO [2020-07-06 21:59:34] 10307 Will invalidate archived reports for 2012-08-11 for following websites ids: 1 -INFO [2020-07-06 21:59:34] 10307 Will invalidate archived reports for 2012-08-10 for following websites ids: 1 -INFO [2020-07-06 21:59:34] 10307 Will invalidate archived reports for 2012-08-09 for following websites ids: 1 -INFO [2020-07-06 21:59:34] 10307 Segment "browserCode==IE" was created or changed recently and will therefore archive today (for site ID = 1) -INFO [2020-07-06 21:59:34] 10307 Segment "visitCount<=5;visitorType!=non-existing-type;daysSinceFirstVisit<=50" was created or changed recently and will therefore archive today (for site ID = 1) -INFO [2020-07-06 21:59:34] 10307 Segment "visitCount<=5;visitorType!=re%2C%3Btest%20is%20encoded;daysSinceFirstVisit<=50" was created or changed recently and will therefore archive today (for site ID = 1) -INFO [2020-07-06 21:59:34] 10307 Done invalidating -INFO [2020-07-06 21:59:34] 10307 Start processing archives for site 1. -INFO [2020-07-06 21:59:37] 10307 Archived website id 1, period = day, date = 2014-03-13, segment = '', 11 visits found. Time elapsed: 1.124s -INFO [2020-07-06 21:59:37] 10307 Archived website id 1, period = day, date = 2014-03-12, segment = '', 1 visits found. Time elapsed: 1.124s -INFO [2020-07-06 21:59:37] 10307 Archived website id 1, period = day, date = 2012-09-30, segment = '', 1 visits found. Time elapsed: 1.124s -INFO [2020-07-06 21:59:38] 10307 Archived website id 1, period = week, date = 2014-03-10, segment = '', 12 visits found. Time elapsed: 1.761s -INFO [2020-07-06 21:59:38] 10307 Archived website id 1, period = week, date = 2012-09-24, segment = '', 1 visits found. Time elapsed: 1.761s -INFO [2020-07-06 21:59:38] 10307 Archived website id 1, period = day, date = 2012-08-19, segment = '', 1 visits found. Time elapsed: 1.761s -INFO [2020-07-06 21:59:40] 10307 Archived website id 1, period = month, date = 2014-03-01, segment = '', 12 visits found. Time elapsed: 1.743s -INFO [2020-07-06 21:59:40] 10307 Archived website id 1, period = month, date = 2012-09-01, segment = '', 1 visits found. Time elapsed: 1.743s -INFO [2020-07-06 21:59:40] 10307 Archived website id 1, period = day, date = 2012-08-15, segment = '', 2 visits found. Time elapsed: 1.743s -INFO [2020-07-06 21:59:43] 10307 Archived website id 1, period = year, date = 2014-01-01, segment = '', 12 visits found. Time elapsed: 2.510s -INFO [2020-07-06 21:59:43] 10307 Archived website id 1, period = week, date = 2012-08-13, segment = '', 3 visits found. Time elapsed: 2.510s -INFO [2020-07-06 21:59:43] 10307 Archived website id 1, period = day, date = 2012-08-11, segment = '', 11 visits found. Time elapsed: 2.510s -INFO [2020-07-06 21:59:47] 10307 Archived website id 1, period = year, date = 2014-01-01, segment = 'browserCode%3D%3DIE', 1 visits found. Time elapsed: 3.015s -INFO [2020-07-06 21:59:47] 10307 Archived website id 1, period = year, date = 2012-01-01, segment = 'browserCode%3D%3DIE', 6 visits found. Time elapsed: 4.118s -INFO [2020-07-06 21:59:47] 10307 Archived website id 1, period = day, date = 2007-04-05, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 4.118s -INFO [2020-07-06 21:59:53] 10307 Archived website id 1, period = year, date = 2014-01-01, segment = 'visitCount%3C%3D5%3BvisitorType%21%3Dnon-existing-type%3BdaysSinceFirstVisit%3C%3D50', 12 visits found. Time elapsed: 4.601s -INFO [2020-07-06 21:59:53] 10307 Archived website id 1, period = year, date = 2012-01-01, segment = 'visitCount%3C%3D5%3BvisitorType%21%3Dnon-existing-type%3BdaysSinceFirstVisit%3C%3D50', 34 visits found. Time elapsed: 5.707s -INFO [2020-07-06 21:59:53] 10307 Archived website id 1, period = week, date = 2007-04-02, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 5.707s -INFO [2020-07-06 21:59:59] 10307 Archived website id 1, period = year, date = 2014-01-01, segment = 'visitCount%3C%3D5%3BvisitorType%21%3Dre%252C%253Btest%2520is%2520encoded%3BdaysSinceFirstVisit%3C%3D50', 12 visits found. Time elapsed: 3.018s -INFO [2020-07-06 21:59:59] 10307 Archived website id 1, period = year, date = 2012-01-01, segment = 'visitCount%3C%3D5%3BvisitorType%21%3Dre%252C%253Btest%2520is%2520encoded%3BdaysSinceFirstVisit%3C%3D50', 34 visits found. Time elapsed: 5.246s -INFO [2020-07-06 21:59:59] 10307 Archived website id 1, period = month, date = 2007-04-01, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 5.246s -INFO [2020-07-06 22:00:00] 10307 Archived website id 1, period = day, date = 2012-08-10, segment = '', 8 visits found. Time elapsed: 0.632s -INFO [2020-07-06 22:00:00] 10307 Archived website id 1, period = day, date = 2012-08-09, segment = '', 11 visits found. Time elapsed: 0.916s -INFO [2020-07-06 22:00:01] 10307 Archived website id 1, period = week, date = 2012-08-06, segment = '', 30 visits found. Time elapsed: 0.827s -INFO [2020-07-06 22:00:02] 10307 Archived website id 1, period = month, date = 2012-08-01, segment = '', 33 visits found. Time elapsed: 1.104s -INFO [2020-07-06 22:00:03] 10307 Archived website id 1, period = year, date = 2012-01-01, segment = '', 34 visits found. Time elapsed: 1.102s -INFO [2020-07-06 22:00:03] 10307 Archived website id 1, period = year, date = 2007-01-01, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 0.564s -INFO [2020-07-06 22:00:03] 10307 Finished archiving for site 1, 27 API requests, Time elapsed: 28.981s [1 / 3 done] -INFO [2020-07-06 22:00:04] 10307 Start processing archives for site 2. -INFO [2020-07-06 22:00:04] 10307 Archived website id 2, period = day, date = 2012-08-15, segment = '', 1 visits found. Time elapsed: 0.549s -INFO [2020-07-06 22:00:05] 10307 Archived website id 2, period = week, date = 2012-08-13, segment = '', 1 visits found. Time elapsed: 0.826s -INFO [2020-07-06 22:00:06] 10307 Archived website id 2, period = month, date = 2012-08-01, segment = '', 1 visits found. Time elapsed: 0.825s -INFO [2020-07-06 22:00:07] 10307 Archived website id 2, period = year, date = 2012-01-01, segment = '', 1 visits found. Time elapsed: 1.110s -INFO [2020-07-06 22:00:07] 10307 Finished archiving for site 2, 4 API requests, Time elapsed: 3.469s [2 / 3 done] -INFO [2020-07-06 22:00:07] 10307 Start processing archives for site 3. -INFO [2020-07-06 22:00:08] 10307 Archived website id 3, period = day, date = 2014-03-13, segment = '', 11 visits found. Time elapsed: 0.834s -INFO [2020-07-06 22:00:08] 10307 Archived website id 3, period = day, date = 2014-03-12, segment = '', 1 visits found. Time elapsed: 0.834s -INFO [2020-07-06 22:00:08] 10307 Archived website id 3, period = day, date = 2012-08-15, segment = '', 3 visits found. Time elapsed: 1.115s -INFO [2020-07-06 22:00:09] 10307 Archived website id 3, period = week, date = 2014-03-10, segment = '', 12 visits found. Time elapsed: 1.257s -INFO [2020-07-06 22:00:09] 10307 Archived website id 3, period = week, date = 2012-08-13, segment = '', 3 visits found. Time elapsed: 1.257s -INFO [2020-07-06 22:00:11] 10307 Archived website id 3, period = month, date = 2014-03-01, segment = '', 12 visits found. Time elapsed: 1.266s -INFO [2020-07-06 22:00:11] 10307 Archived website id 3, period = month, date = 2012-08-01, segment = '', 3 visits found. Time elapsed: 1.818s -INFO [2020-07-06 22:00:13] 10307 Archived website id 3, period = year, date = 2014-01-01, segment = '', 12 visits found. Time elapsed: 1.899s -INFO [2020-07-06 22:00:13] 10307 Archived website id 3, period = year, date = 2012-01-01, segment = '', 3 visits found. Time elapsed: 1.920s -INFO [2020-07-06 22:00:13] 10307 Finished archiving for site 3, 9 API requests, Time elapsed: 6.303s [3 / 3 done] -INFO [2020-07-06 22:00:13] 10307 Done archiving! -INFO [2020-07-06 22:00:13] 10307 --------------------------- -INFO [2020-07-06 22:00:13] 10307 SUMMARY -INFO [2020-07-06 22:00:13] 10307 Processed 40 archives. -INFO [2020-07-06 22:00:13] 10307 Total API requests: 40 -INFO [2020-07-06 22:00:13] 10307 done: 40 req, 39477 ms, no error -INFO [2020-07-06 22:00:13] 10307 Time elapsed: 39.477s -INFO [2020-07-06 22:00:13] 10307 --------------------------- -INFO [2020-07-06 22:00:13] 10307 SCHEDULED TASKS -INFO [2020-07-06 22:00:13] 10307 Starting Scheduled tasks... -INFO [2020-07-06 22:00:13] 10307 done -INFO [2020-07-06 22:00:13] 10307 ---------------------------
\ No newline at end of file +INFO [2020-09-19 17:11:11] 10540 --------------------------- +INFO [2020-09-19 17:11:11] 10540 INIT +INFO [2020-09-19 17:11:11] 10540 Running Matomo 4.0.0-b2 as Super User +INFO [2020-09-19 17:11:11] 10540 --------------------------- +INFO [2020-09-19 17:11:11] 10540 NOTES +INFO [2020-09-19 17:11:11] 10540 - If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Matomo UI > Settings > General Settings. +INFO [2020-09-19 17:11:11] 10540 See the doc at: https://matomo.org/docs/setup-auto-archiving/ +INFO [2020-09-19 17:11:11] 10540 - Async process archiving supported, using CliMulti. +INFO [2020-09-19 17:11:11] 10540 - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings. +INFO [2020-09-19 17:11:12] 10540 --------------------------- +INFO [2020-09-19 17:11:12] 10540 START +INFO [2020-09-19 17:11:12] 10540 Starting Matomo reports archiving... +INFO [2020-09-19 17:11:12] 10540 Start processing archives for site 1. +INFO [2020-09-19 17:11:12] 10540 Archived website id 1, period = day, date = 2007-04-05, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 0.524s +INFO [2020-09-19 17:11:13] 10540 Archived website id 1, period = week, date = 2007-04-02, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 0.536s +INFO [2020-09-19 17:11:13] 10540 Archived website id 1, period = month, date = 2007-04-01, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 0.537s +INFO [2020-09-19 17:11:14] 10540 Archived website id 1, period = year, date = 2007-01-01, segment = '', plugin = ExamplePlugin, 1 visits found. Time elapsed: 0.533s +INFO [2020-09-19 17:11:14] 10540 Checking for queued invalidations... +INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2014-03-13 for following websites ids: 1 +INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2014-03-12 for following websites ids: 1 +INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-09-30 for following websites ids: 1 +INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-19 for following websites ids: 1 +INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-15 for following websites ids: 1 +INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-11 for following websites ids: 1 +INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-10 for following websites ids: 1 +INFO [2020-09-19 17:11:14] 10540 Will invalidate archived reports for 2012-08-09 for following websites ids: 1 +INFO [2020-09-19 17:11:14] 10540 Segment "browserCode==IE" was created or changed recently and will therefore archive today (for site ID = 1) +INFO [2020-09-19 17:11:14] 10540 Segment "visitCount<=5;pageUrl=@/blog/;countryCode==jp" was created or changed recently and will therefore archive today (for site ID = 1) +INFO [2020-09-19 17:11:14] 10540 Segment "visitCount<=5;pageUrl=@%2Fblog%2F;countryCode==jp" was created or changed recently and will therefore archive today (for site ID = 1) +INFO [2020-09-19 17:11:14] 10540 Done invalidating +INFO [2020-09-19 17:11:17] 10540 Archived website id 1, period = day, date = 2014-03-13, segment = '', 11 visits found. Time elapsed: 1.033s +INFO [2020-09-19 17:11:17] 10540 Archived website id 1, period = day, date = 2014-03-12, segment = '', 1 visits found. Time elapsed: 1.033s +INFO [2020-09-19 17:11:17] 10540 Archived website id 1, period = day, date = 2012-09-30, segment = '', 1 visits found. Time elapsed: 1.033s +INFO [2020-09-19 17:11:18] 10540 Archived website id 1, period = week, date = 2014-03-10, segment = '', 12 visits found. Time elapsed: 1.610s +INFO [2020-09-19 17:11:18] 10540 Archived website id 1, period = week, date = 2012-09-24, segment = '', 1 visits found. Time elapsed: 1.610s +INFO [2020-09-19 17:11:18] 10540 Archived website id 1, period = day, date = 2012-08-19, segment = '', 1 visits found. Time elapsed: 1.610s +INFO [2020-09-19 17:11:20] 10540 Archived website id 1, period = month, date = 2014-03-01, segment = '', 12 visits found. Time elapsed: 1.613s +INFO [2020-09-19 17:11:20] 10540 Archived website id 1, period = month, date = 2012-09-01, segment = '', 1 visits found. Time elapsed: 1.613s +INFO [2020-09-19 17:11:20] 10540 Archived website id 1, period = day, date = 2012-08-15, segment = '', 2 visits found. Time elapsed: 1.613s +INFO [2020-09-19 17:11:22] 10540 Archived website id 1, period = year, date = 2014-01-01, segment = '', 12 visits found. Time elapsed: 2.161s +INFO [2020-09-19 17:11:22] 10540 Archived website id 1, period = week, date = 2012-08-13, segment = '', 3 visits found. Time elapsed: 2.161s +INFO [2020-09-19 17:11:22] 10540 Archived website id 1, period = day, date = 2012-08-11, segment = '', 11 visits found. Time elapsed: 2.161s +INFO [2020-09-19 17:11:23] 10540 Archived website id 1, period = year, date = 2014-01-01, segment = 'visitCount%3C%3D5%3BpageUrl%3D%40%2Fblog%2F%3BcountryCode%3D%3Djp', 0 visits found. Time elapsed: 0.759s +INFO [2020-09-19 17:11:23] 10540 Archived website id 1, period = day, date = 2012-08-10, segment = '', 8 visits found. Time elapsed: 1.053s +INFO [2020-09-19 17:11:23] 10540 Archived website id 1, period = day, date = 2012-08-09, segment = '', 11 visits found. Time elapsed: 1.053s +INFO [2020-09-19 17:11:26] 10540 Archived website id 1, period = year, date = 2014-01-01, segment = 'browserCode%3D%3DIE', 1 visits found. Time elapsed: 2.475s +INFO [2020-09-19 17:11:26] 10540 Archived website id 1, period = week, date = 2012-08-06, segment = '', 30 visits found. Time elapsed: 2.475s +INFO [2020-09-19 17:11:27] 10540 Archived website id 1, period = month, date = 2012-08-01, segment = '', 33 visits found. Time elapsed: 1.073s +INFO [2020-09-19 17:11:28] 10540 Archived website id 1, period = year, date = 2012-01-01, segment = '', 34 visits found. Time elapsed: 1.056s +INFO [2020-09-19 17:11:32] 10540 Archived website id 1, period = year, date = 2012-01-01, segment = 'visitCount%3C%3D5%3BpageUrl%3D%40%2Fblog%2F%3BcountryCode%3D%3Djp', 7 visits found. Time elapsed: 3.689s +INFO [2020-09-19 17:11:35] 10540 Archived website id 1, period = year, date = 2012-01-01, segment = 'browserCode%3D%3DIE', 6 visits found. Time elapsed: 3.181s +INFO [2020-09-19 17:11:35] 10540 Checking for queued invalidations... +INFO [2020-09-19 17:11:35] 10540 Done invalidating +INFO [2020-09-19 17:11:35] 10540 Finished archiving for site 1, 25 API requests, Time elapsed: 23.792s [1 / 3 done] +INFO [2020-09-19 17:11:35] 10540 Start processing archives for site 2. +INFO [2020-09-19 17:11:35] 10540 Checking for queued invalidations... +INFO [2020-09-19 17:11:35] 10540 Will invalidate archived reports for 2012-08-15 for following websites ids: 2 +INFO [2020-09-19 17:11:35] 10540 Done invalidating +INFO [2020-09-19 17:11:36] 10540 Archived website id 2, period = day, date = 2012-08-15, segment = '', 1 visits found. Time elapsed: 0.542s +INFO [2020-09-19 17:11:37] 10540 Archived website id 2, period = week, date = 2012-08-13, segment = '', 1 visits found. Time elapsed: 0.795s +INFO [2020-09-19 17:11:38] 10540 Archived website id 2, period = month, date = 2012-08-01, segment = '', 1 visits found. Time elapsed: 1.064s +INFO [2020-09-19 17:11:39] 10540 Archived website id 2, period = year, date = 2012-01-01, segment = '', 1 visits found. Time elapsed: 1.067s +INFO [2020-09-19 17:11:39] 10540 Checking for queued invalidations... +INFO [2020-09-19 17:11:39] 10540 Done invalidating +INFO [2020-09-19 17:11:39] 10540 Finished archiving for site 2, 4 API requests, Time elapsed: 3.619s [2 / 3 done] +INFO [2020-09-19 17:11:39] 10540 Start processing archives for site 3. +INFO [2020-09-19 17:11:39] 10540 Checking for queued invalidations... +INFO [2020-09-19 17:11:39] 10540 Will invalidate archived reports for 2014-03-13 for following websites ids: 3 +INFO [2020-09-19 17:11:39] 10540 Will invalidate archived reports for 2014-03-12 for following websites ids: 3 +INFO [2020-09-19 17:11:39] 10540 Will invalidate archived reports for 2012-08-15 for following websites ids: 3 +INFO [2020-09-19 17:11:39] 10540 Done invalidating +INFO [2020-09-19 17:11:40] 10540 Archived website id 3, period = day, date = 2014-03-13, segment = '', 11 visits found. Time elapsed: 1.027s +INFO [2020-09-19 17:11:40] 10540 Archived website id 3, period = day, date = 2014-03-12, segment = '', 1 visits found. Time elapsed: 1.027s +INFO [2020-09-19 17:11:40] 10540 Archived website id 3, period = day, date = 2012-08-15, segment = '', 3 visits found. Time elapsed: 1.027s +INFO [2020-09-19 17:11:42] 10540 Archived website id 3, period = week, date = 2014-03-10, segment = '', 12 visits found. Time elapsed: 1.449s +INFO [2020-09-19 17:11:42] 10540 Archived website id 3, period = week, date = 2012-08-13, segment = '', 3 visits found. Time elapsed: 1.449s +INFO [2020-09-19 17:11:44] 10540 Archived website id 3, period = month, date = 2014-03-01, segment = '', 12 visits found. Time elapsed: 1.411s +INFO [2020-09-19 17:11:44] 10540 Archived website id 3, period = month, date = 2012-08-01, segment = '', 3 visits found. Time elapsed: 1.952s +INFO [2020-09-19 17:11:46] 10540 Archived website id 3, period = year, date = 2014-01-01, segment = '', 12 visits found. Time elapsed: 2.012s +INFO [2020-09-19 17:11:46] 10540 Archived website id 3, period = year, date = 2012-01-01, segment = '', 3 visits found. Time elapsed: 2.012s +INFO [2020-09-19 17:11:46] 10540 Checking for queued invalidations... +INFO [2020-09-19 17:11:46] 10540 Done invalidating +INFO [2020-09-19 17:11:46] 10540 Finished archiving for site 3, 9 API requests, Time elapsed: 6.651s [3 / 3 done] +INFO [2020-09-19 17:11:46] 10540 Done archiving! +INFO [2020-09-19 17:11:46] 10540 --------------------------- +INFO [2020-09-19 17:11:46] 10540 SUMMARY +INFO [2020-09-19 17:11:46] 10540 Processed 38 archives. +INFO [2020-09-19 17:11:46] 10540 Total API requests: 38 +INFO [2020-09-19 17:11:46] 10540 done: 38 req, 34209 ms, no error +INFO [2020-09-19 17:11:46] 10540 Time elapsed: 34.209s +INFO [2020-09-19 17:11:46] 10540 --------------------------- +INFO [2020-09-19 17:11:46] 10540 SCHEDULED TASKS +INFO [2020-09-19 17:11:46] 10540 Starting Scheduled tasks... +INFO [2020-09-19 17:11:46] 10540 done +INFO [2020-09-19 17:11:46] 10540 ---------------------------
\ No newline at end of file diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_day.xml index bbba10abb2..74f98a20a2 100644 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_day.xml +++ b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_day.xml @@ -2,7 +2,7 @@ <results> <result idSite="1"> <ExamplePlugin_example_metric>3382</ExamplePlugin_example_metric> - <ExamplePlugin_example_metric2>60</ExamplePlugin_example_metric2> + <ExamplePlugin_example_metric2>0</ExamplePlugin_example_metric2> </result> <result idSite="2" /> <result idSite="3" /> diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_week.xml index bbba10abb2..74f98a20a2 100644 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_week.xml +++ b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_noOptions__ExamplePlugin.getExampleArchivedMetric_week.xml @@ -2,7 +2,7 @@ <results> <result idSite="1"> <ExamplePlugin_example_metric>3382</ExamplePlugin_example_metric> - <ExamplePlugin_example_metric2>60</ExamplePlugin_example_metric2> + <ExamplePlugin_example_metric2>0</ExamplePlugin_example_metric2> </result> <result idSite="2" /> <result idSite="3" /> diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_day.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_day.xml index 3a88d7f426..8be8d54d20 100644 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_day.xml +++ b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_day.xml @@ -2,7 +2,7 @@ <results> <result idSite="1"> <ExamplePlugin_example_metric>3382</ExamplePlugin_example_metric> - <ExamplePlugin_example_metric2>80</ExamplePlugin_example_metric2> + <ExamplePlugin_example_metric2>1</ExamplePlugin_example_metric2> </result> <result idSite="2" /> <result idSite="3" /> diff --git a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_week.xml b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_week.xml index 3a88d7f426..8be8d54d20 100644 --- a/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_week.xml +++ b/plugins/CoreConsole/tests/System/expected/test_ArchiveCronTest_singleMetric__ExamplePlugin.getExampleArchivedMetric_week.xml @@ -2,7 +2,7 @@ <results> <result idSite="1"> <ExamplePlugin_example_metric>3382</ExamplePlugin_example_metric> - <ExamplePlugin_example_metric2>80</ExamplePlugin_example_metric2> + <ExamplePlugin_example_metric2>1</ExamplePlugin_example_metric2> </result> <result idSite="2" /> <result idSite="3" /> diff --git a/plugins/CustomDimensions/tests/System/expected/test___API.getReportMetadata_day.xml b/plugins/CustomDimensions/tests/System/expected/test___API.getReportMetadata_day.xml index d18499602f..5ef9bcbf75 100644 --- a/plugins/CustomDimensions/tests/System/expected/test___API.getReportMetadata_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test___API.getReportMetadata_day.xml @@ -256,7 +256,7 @@ <module>UserLanguage</module> <action>getLanguage</action> <dimension>Language</dimension> - <documentation>This report shows which language the visitor's browsers are using. (e.g. "English")</documentation> + <documentation>This report shows which language the visitor's browsers are using. (e.g. "English")</documentation> <metrics> <nb_visits>Visits</nb_visits> <nb_uniq_visitors>Unique visitors</nb_uniq_visitors> @@ -335,7 +335,7 @@ <module>UserLanguage</module> <action>getLanguageCode</action> <dimension>Language</dimension> - <documentation>This report shows which exact language code the visitor's browsers is set to. (e.g. "German - Austria (de-at)")</documentation> + <documentation>This report shows which exact language code the visitor's browsers is set to. (e.g. "German - Austria (de-at)")</documentation> <metrics> <nb_visits>Visits</nb_visits> <nb_uniq_visitors>Unique visitors</nb_uniq_visitors> @@ -2575,4 +2575,4 @@ <imageGraphEvolutionUrl>index.php?module=API&method=ImageGraph.get&idSite=1&apiModule=API&apiAction=get&period=day&date=2012-12-25,2013-01-23</imageGraphEvolutionUrl> <uniqueId>API_get</uniqueId> </row> -</result> +</result>
\ No newline at end of file diff --git a/plugins/Diagnostics/tests/Integration/Commands/AnalyzeArchiveTableTest.php b/plugins/Diagnostics/tests/Integration/Commands/AnalyzeArchiveTableTest.php index b71601e41e..5cf65dc4b3 100644 --- a/plugins/Diagnostics/tests/Integration/Commands/AnalyzeArchiveTableTest.php +++ b/plugins/Diagnostics/tests/Integration/Commands/AnalyzeArchiveTableTest.php @@ -41,9 +41,9 @@ Statistics for the archive_numeric_2010_03 and archive_blob_2010_03 tables: +-------------------------------------------+------------+---------------+-------------+---------+-----------+----------------+-------------+-------------+ | Group | # Archives | # Invalidated | # Temporary | # Error | # Segment | # Numeric Rows | # Blob Rows | # Blob Data | +-------------------------------------------+------------+---------------+-------------+---------+-----------+----------------+-------------+-------------+ -| week[2010-03-01 - 2010-03-07] idSite = 1 | 7 | 0 | 0 | 0 | 6 | 75 | 97 | %d | -| month[2010-03-01 - 2010-03-31] idSite = 1 | 7 | 0 | 0 | 0 | 6 | 75 | 97 | %d | -| day[2010-03-06 - 2010-03-06] idSite = 1 | 7 | 0 | 0 | 0 | 6 | 75 | 73 | %d | +| week[2010-03-01 - 2010-03-07] idSite = 1 | 7 | 0 | 0 | 0 | 6 | 74 | 97 | %d | +| month[2010-03-01 - 2010-03-31] idSite = 1 | 7 | 0 | 0 | 0 | 6 | 74 | 97 | %d | +| day[2010-03-06 - 2010-03-06] idSite = 1 | 7 | 0 | 0 | 0 | 6 | 74 | 73 | %d | +-------------------------------------------+------------+---------------+-------------+---------+-----------+----------------+-------------+-------------+ Total # Archives: 21 diff --git a/plugins/ExamplePlugin/Archiver.php b/plugins/ExamplePlugin/Archiver.php index 89d79959b9..c206354382 100644 --- a/plugins/ExamplePlugin/Archiver.php +++ b/plugins/ExamplePlugin/Archiver.php @@ -87,10 +87,9 @@ class Archiver extends \Piwik\Plugin\Archiver } if ($this->isRequestedReport(self::EXAMPLEPLUGIN_CONST_METRIC_NAME)) { - $archiveCount = $this->incrementArchiveCount(); - $archiveCount = 50 + $archiveCount; - $archiveCount += 5 - ($archiveCount % 5); // round up to nearest 5 multiple to avoid random test failures - $this->getProcessor()->insertNumericRecord(self::EXAMPLEPLUGIN_CONST_METRIC_NAME, $archiveCount); + $callCount = $this->getAndIncrementArchiveCallCount(); + $metricValue = $callCount > 0 ? 1 : 0; + $this->getProcessor()->insertNumericRecord(self::EXAMPLEPLUGIN_CONST_METRIC_NAME, $metricValue); } } @@ -124,16 +123,15 @@ class Archiver extends \Piwik\Plugin\Archiver private function createSequence() { - $sequence = new Sequence('ExamplePlugin_archiveCount'); - if (!$sequence->exists()) { - for ($i = 0; $i < 100; ++$i) { - try { - $sequence->create(); - break; - } catch (\Exception $ex) { - // ignore - } - } - } + } + + private function getAndIncrementArchiveCallCount() + { + $params = $this->getProcessor()->getParams(); + $optionName = 'ExamplePlugin.metricValue.' . md5($params->getSite()->getId() . '.' . $params->getPeriod()->getRangeString() + . '.' . $params->getPeriod()->getLabel() . '.' . $params->getSegment()->getHash()); + $value = (int) Option::get($optionName); + Option::set($optionName, $value + 1); + return $value; } } diff --git a/tests/PHPUnit/Integration/ArchiveProcessor/LoaderTest.php b/tests/PHPUnit/Integration/ArchiveProcessor/LoaderTest.php index 7b63a9571d..3cfd928358 100644 --- a/tests/PHPUnit/Integration/ArchiveProcessor/LoaderTest.php +++ b/tests/PHPUnit/Integration/ArchiveProcessor/LoaderTest.php @@ -178,15 +178,6 @@ class LoaderTest extends IntegrationTestCase 'name' => 'ExamplePlugin_example_metric', 'value' => '-603', ), - array ( - 'idarchive' => '2', - 'idsite' => '1', - 'date1' => '2018-03-03', - 'date2' => '2018-03-03', - 'period' => '1', - 'name' => 'ExamplePlugin_example_metric2', - 'value' => '55', - ), ), false, ], @@ -285,15 +276,6 @@ class LoaderTest extends IntegrationTestCase 'name' => 'ExamplePlugin_example_metric', 'value' => '-603', ), - array ( - 'idarchive' => '2', - 'idsite' => '1', - 'date1' => '2018-03-03', - 'date2' => '2018-03-03', - 'period' => '1', - 'name' => 'ExamplePlugin_example_metric2', - 'value' => '55', - ), ), false, ], @@ -352,15 +334,6 @@ class LoaderTest extends IntegrationTestCase 'name' => 'ExamplePlugin_example_metric', 'value' => '-603', ), - array ( - 'idarchive' => '2', - 'idsite' => '1', - 'date1' => '2018-03-03', - 'date2' => '2018-03-03', - 'period' => '1', - 'name' => 'ExamplePlugin_example_metric2', - 'value' => '55', - ), ), false, ], @@ -419,15 +392,6 @@ class LoaderTest extends IntegrationTestCase 'name' => 'ExamplePlugin_example_metric', 'value' => '-603', ), - array ( - 'idarchive' => '2', - 'idsite' => '1', - 'date1' => '2018-03-03', - 'date2' => '2018-03-03', - 'period' => '1', - 'name' => 'ExamplePlugin_example_metric2', - 'value' => '55', - ), ), false, ], @@ -509,15 +473,6 @@ class LoaderTest extends IntegrationTestCase 'name' => 'ExamplePlugin_example_metric', 'value' => '-603', ), - array ( - 'idarchive' => '2', - 'idsite' => '1', - 'date1' => '2018-03-03', - 'date2' => '2018-03-03', - 'period' => '1', - 'name' => 'ExamplePlugin_example_metric2', - 'value' => '55', - ), ), true, ], @@ -707,15 +662,6 @@ class LoaderTest extends IntegrationTestCase 'name' => 'done.ExamplePlugin', 'value' => '5', ), - array ( - 'idarchive' => '3', - 'idsite' => '1', - 'date1' => '2018-03-03', - 'date2' => '2018-03-03', - 'period' => '1', - 'name' => 'ExamplePlugin_example_metric2', - 'value' => '55', - ), ), $reportSpecificArchive2, ], diff --git a/tests/PHPUnit/Integration/CronArchive/QueueConsumerTest.php b/tests/PHPUnit/Integration/CronArchive/QueueConsumerTest.php index 1d14e457b9..eab8866ba5 100644 --- a/tests/PHPUnit/Integration/CronArchive/QueueConsumerTest.php +++ b/tests/PHPUnit/Integration/CronArchive/QueueConsumerTest.php @@ -45,6 +45,7 @@ class QueueConsumerTest extends IntegrationTestCase }); $cronArchive = new CronArchive(); + $cronArchive->init(); $archiveFilter = $this->makeTestArchiveFilter(); @@ -91,6 +92,14 @@ class QueueConsumerTest extends IntegrationTestCase // duplicates ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-06', 'date2' => '2018-03-06', 'period' => 1, 'report' => null], + ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-06', 'date2' => '2018-03-06', 'period' => 1, 'report' => null], + ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-06', 'date2' => '2018-03-06', 'period' => 1, 'report' => null], + ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-06', 'date2' => '2018-03-06', 'period' => 1, 'report' => null], + ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-06', 'date2' => '2018-03-06', 'period' => 1, 'report' => null], + ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-01', 'date2' => '2018-03-31', 'period' => 3, 'report' => null], + ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-01', 'date2' => '2018-03-31', 'period' => 3, 'report' => null], + ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-01', 'date2' => '2018-03-31', 'period' => 3, 'report' => null], + ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-01', 'date2' => '2018-03-31', 'period' => 3, 'report' => null], ['idarchive' => 1, 'name' => 'done', 'idsite' => 1, 'date1' => '2018-03-01', 'date2' => '2018-03-31', 'period' => 3, 'report' => null], ]; @@ -187,16 +196,16 @@ class QueueConsumerTest extends IntegrationTestCase ), ), array ( - array ( // duplicate, processed but if in progress or recent should be skipped + array ( 'idarchive' => '1', 'idsite' => '1', 'date1' => '2018-03-06', 'date2' => '2018-03-06', 'period' => '1', - 'name' => 'done', + 'name' => 'done5f4f9bafeda3443c3c2d4b2ef4dffadc', 'report' => NULL, 'plugin' => NULL, - 'segment' => '', + 'segment' => 'browserCode==IE', ), array ( 'idarchive' => '1', @@ -214,17 +223,6 @@ class QueueConsumerTest extends IntegrationTestCase array ( 'idarchive' => '1', 'idsite' => '1', - 'date1' => '2018-03-06', - 'date2' => '2018-03-06', - 'period' => '1', - 'name' => 'done5f4f9bafeda3443c3c2d4b2ef4dffadc', - 'report' => NULL, - 'plugin' => NULL, - 'segment' => 'browserCode==IE', - ), - array ( - 'idarchive' => '1', - 'idsite' => '1', 'date1' => '2018-03-04', 'date2' => '2018-03-04', 'period' => '1', @@ -339,6 +337,18 @@ class QueueConsumerTest extends IntegrationTestCase print "\nInvalidations inserted:\n" . var_export($invalidations, true) . "\n"; throw $ex; } + + // automated ccheck for no duplicates + $invalidationDescs = []; + foreach ($iteratedInvalidations as $group) { + foreach ($group as $invalidation) { + unset($invalidation['idarchive']); + $invalidationDescs[] = implode('.', $invalidation); + } + } + $uniqueInvalidationDescs = array_unique($invalidationDescs); + + $this->assertEquals($uniqueInvalidationDescs, $invalidationDescs, "Found duplicate archives being processed."); } private function makeTestArchiveFilter($restrictToDateRange = null, $restrictToPeriods = null, $segmentsToForce = null, $disableSegmentsArchiving = false) @@ -382,6 +392,7 @@ class QueueConsumerTest extends IntegrationTestCase Date::$now = strtotime('2020-04-05'); $cronArchive = new CronArchive(); + $cronArchive->init(); $archiveFilter = $this->makeTestArchiveFilter(); diff --git a/tests/PHPUnit/Integration/CronArchiveTest.php b/tests/PHPUnit/Integration/CronArchiveTest.php index 6a1613c22e..beb920193e 100644 --- a/tests/PHPUnit/Integration/CronArchiveTest.php +++ b/tests/PHPUnit/Integration/CronArchiveTest.php @@ -151,8 +151,10 @@ class CronArchiveTest extends IntegrationTestCase $api = API::getInstance(); $cronarchive = new TestCronArchive(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/index.php'); + $cronarchive->init(); $cronarchive->setApiToInvalidateArchivedReport($api); - $cronarchive->invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain(); + $cronarchive->invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain(1); + $cronarchive->invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain(2); /** * should look like this but the result is random @@ -162,19 +164,22 @@ class CronArchiveTest extends IntegrationTestCase ) */ $invalidatedReports = $api->getInvalidatedReports(); - $this->assertCount(2, $invalidatedReports); + $this->assertCount(3, $invalidatedReports); sort($invalidatedReports[0][0]); sort($invalidatedReports[1][0]); + sort($invalidatedReports[2][0]); usort($invalidatedReports, function ($a, $b) { return strcmp($a[1], $b[1]); }); - $this->assertSame(array(1,2), $invalidatedReports[0][0]); + $this->assertSame(array(1), $invalidatedReports[0][0]); $this->assertSame('2014-04-05', $invalidatedReports[0][1]); $this->assertSame(array(2), $invalidatedReports[1][0]); - $this->assertSame('2014-04-06', $invalidatedReports[1][1]); + $this->assertSame('2014-04-05', $invalidatedReports[1][1]); + $this->assertSame(array(2), $invalidatedReports[2][0]); + $this->assertSame('2014-04-06', $invalidatedReports[2][1]); } public function test_wasSegmentCreatedRecently() @@ -214,6 +219,7 @@ class CronArchiveTest extends IntegrationTestCase $logger = new FakeLogger(); $archiver = new CronArchive(null, $logger); + $archiver->init(); $archiver->skipSegmentsToday = true; $archiver->shouldArchiveAllSites = true; $archiver->shouldArchiveAllPeriodsSince = true; @@ -279,6 +285,7 @@ NOTES --------------------------- START Starting Matomo reports archiving... +Start processing archives for site 1. Checking for queued invalidations... Will invalidate archived reports for 2019-12-12 for following websites ids: 1 Will invalidate archived reports for 2019-12-11 for following websites ids: 1 @@ -289,7 +296,6 @@ Checking for queued invalidations... Segment "actions>=2" was created or changed recently and will therefore archive today (for site ID = 1) Segment "actions>=4" was created or changed recently and will therefore archive today (for site ID = 1) Done invalidating -Start processing archives for site 1. Found invalidated archive we can skip (no visits): [idinvalidation = 43, idsite = 1, period = day(2020-02-03 - 2020-02-03), name = donee0512c03f7c20af6ef96a8d792c6bb9f] Skipping invalidated archive 73, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 73, idsite = 1, period = day(2020-02-03 - 2020-02-03), name = done49a9440bd6dba4b8850035e09d043c67] Found invalidated archive we can skip (no visits): [idinvalidation = 44, idsite = 1, period = week(2020-02-03 - 2020-02-09), name = donee0512c03f7c20af6ef96a8d792c6bb9f] @@ -332,22 +338,22 @@ Skipping invalidated archive 6, segment '' is not in --force-idsegments: [idinva Skipping invalidated archive 10, segment '' is not in --force-idsegments: [idinvalidation = 10, idsite = 1, period = week(2019-12-09 - 2019-12-15), name = done] Processing invalidation: [idinvalidation = 21, idsite = 1, period = week(2019-12-09 - 2019-12-15), name = donee0512c03f7c20af6ef96a8d792c6bb9f]. Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 51, idsite = 1, period = week(2019-12-09 - 2019-12-15), name = done49a9440bd6dba4b8850035e09d043c67] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 13, idsite = 1, period = day(2019-12-02 - 2019-12-02), name = done] +Skipping invalidated archive 13, segment '' is not in --force-idsegments: [idinvalidation = 13, idsite = 1, period = day(2019-12-02 - 2019-12-02), name = done] Processing invalidation: [idinvalidation = 17, idsite = 1, period = day(2019-12-02 - 2019-12-02), name = donee0512c03f7c20af6ef96a8d792c6bb9f]. Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 47, idsite = 1, period = day(2019-12-02 - 2019-12-02), name = done49a9440bd6dba4b8850035e09d043c67] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 14, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 14, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = done] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 18, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = donee0512c03f7c20af6ef96a8d792c6bb9f] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 48, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = done49a9440bd6dba4b8850035e09d043c67] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 3, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 7, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 11, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 15, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 3, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 7, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 11, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 15, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 19, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 49, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 32, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 62, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] No next invalidated archive. @@ -356,21 +362,20 @@ Starting archiving for ?module=API&method=CoreAdminHome.archiveReports&idSite=1& Archived website id 1, period = week, date = 2019-12-09, segment = 'actions%3E%3D2', 0 visits found. Time elapsed: %fs Archived website id 1, period = day, date = 2019-12-02, segment = 'actions%3E%3D2', 0 visits found. Time elapsed: %fs Skipping invalidated archive 51, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 51, idsite = 1, period = week(2019-12-09 - 2019-12-15), name = done49a9440bd6dba4b8850035e09d043c67] -Skipping invalidated archive 13, segment '' is not in --force-idsegments: [idinvalidation = 13, idsite = 1, period = day(2019-12-02 - 2019-12-02), name = done] Skipping invalidated archive 47, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 47, idsite = 1, period = day(2019-12-02 - 2019-12-02), name = done49a9440bd6dba4b8850035e09d043c67] Skipping invalidated archive 14, segment '' is not in --force-idsegments: [idinvalidation = 14, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = done] Processing invalidation: [idinvalidation = 18, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = donee0512c03f7c20af6ef96a8d792c6bb9f]. Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 48, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = done49a9440bd6dba4b8850035e09d043c67] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 3, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 7, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 11, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 15, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 3, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 7, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 11, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 15, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 19, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 49, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 32, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 62, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] No next invalidated archive. @@ -383,10 +388,10 @@ Skipping invalidated archive 11, segment '' is not in --force-idsegments: [idinv Skipping invalidated archive 15, segment '' is not in --force-idsegments: [idinvalidation = 15, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] Processing invalidation: [idinvalidation = 19, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f]. Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 49, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] -Found archive with different done flag type (segment vs. no segment) in concurrent batch, skipping until next batch: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 32, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 62, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] No next invalidated archive. @@ -414,6 +419,155 @@ Total API requests: 5 done: 5 req, %d ms, no error Time elapsed: %fs LOG; + $expected = <<<LOG +--------------------------- +INIT +Running Matomo 4.0.0-b2 as Super User +--------------------------- +NOTES +- If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Matomo UI > Settings > General Settings. + See the doc at: https://matomo.org/docs/setup-auto-archiving/ +- Async process archiving supported, using CliMulti. +- Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings. +- Limiting segment archiving to following segments: + * actions>=2;browserCode=FF + * actions>=2 +--------------------------- +START +Starting Matomo reports archiving... +Start processing archives for site 1. +Checking for queued invalidations... + Will invalidate archived reports for 2019-12-12 for following websites ids: 1 + Will invalidate archived reports for 2019-12-11 for following websites ids: 1 + Will invalidate archived reports for 2019-12-10 for following websites ids: 1 + Will invalidate archived reports for 2019-12-02 for following websites ids: 1 + Today archive can be skipped due to no visits for idSite = 1, skipping invalidation... + Yesterday archive can be skipped due to no visits for idSite = 1, skipping invalidation... + Segment "actions>=2" was created or changed recently and will therefore archive today (for site ID = 1) + Segment "actions>=4" was created or changed recently and will therefore archive today (for site ID = 1) +Done invalidating +Skipping invalidated archive 73, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 73, idsite = 1, period = day(2020-02-03 - 2020-02-03), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 43, idsite = 1, period = day(2020-02-03 - 2020-02-03), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 74, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 74, idsite = 1, period = week(2020-02-03 - 2020-02-09), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 44, idsite = 1, period = week(2020-02-03 - 2020-02-09), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 72, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 72, idsite = 1, period = day(2020-02-02 - 2020-02-02), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 42, idsite = 1, period = day(2020-02-02 - 2020-02-02), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 70, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 70, idsite = 1, period = day(2020-02-01 - 2020-02-01), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 40, idsite = 1, period = day(2020-02-01 - 2020-02-01), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 71, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 71, idsite = 1, period = month(2020-02-01 - 2020-02-29), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 41, idsite = 1, period = month(2020-02-01 - 2020-02-29), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 66, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 66, idsite = 1, period = week(2020-01-27 - 2020-02-02), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 36, idsite = 1, period = week(2020-01-27 - 2020-02-02), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 63, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 63, idsite = 1, period = day(2020-01-01 - 2020-01-01), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 33, idsite = 1, period = day(2020-01-01 - 2020-01-01), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 64, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 64, idsite = 1, period = month(2020-01-01 - 2020-01-31), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 34, idsite = 1, period = month(2020-01-01 - 2020-01-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 65, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 65, idsite = 1, period = year(2020-01-01 - 2020-12-31), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 35, idsite = 1, period = year(2020-01-01 - 2020-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 58, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 58, idsite = 1, period = day(2019-12-31 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 28, idsite = 1, period = day(2019-12-31 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 56, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 56, idsite = 1, period = day(2019-12-30 - 2019-12-30), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 26, idsite = 1, period = day(2019-12-30 - 2019-12-30), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 57, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 57, idsite = 1, period = week(2019-12-30 - 2020-01-05), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 27, idsite = 1, period = week(2019-12-30 - 2020-01-05), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 54, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 54, idsite = 1, period = day(2019-12-23 - 2019-12-23), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 24, idsite = 1, period = day(2019-12-23 - 2019-12-23), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 55, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 55, idsite = 1, period = week(2019-12-23 - 2019-12-29), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 25, idsite = 1, period = week(2019-12-23 - 2019-12-29), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 52, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 52, idsite = 1, period = day(2019-12-16 - 2019-12-16), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 22, idsite = 1, period = day(2019-12-16 - 2019-12-16), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 53, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 53, idsite = 1, period = week(2019-12-16 - 2019-12-22), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 23, idsite = 1, period = week(2019-12-16 - 2019-12-22), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 1, segment '' is not in --force-idsegments: [idinvalidation = 1, idsite = 1, period = day(2019-12-12 - 2019-12-12), name = done] +Skipping invalidated archive 5, segment '' is not in --force-idsegments: [idinvalidation = 5, idsite = 1, period = day(2019-12-11 - 2019-12-11), name = done] +Skipping invalidated archive 9, segment '' is not in --force-idsegments: [idinvalidation = 9, idsite = 1, period = day(2019-12-10 - 2019-12-10), name = done] +Skipping invalidated archive 50, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 50, idsite = 1, period = day(2019-12-09 - 2019-12-09), name = done49a9440bd6dba4b8850035e09d043c67] +Found invalidated archive we can skip (no visits): [idinvalidation = 20, idsite = 1, period = day(2019-12-09 - 2019-12-09), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Skipping invalidated archive 10, segment '' is not in --force-idsegments: [idinvalidation = 10, idsite = 1, period = week(2019-12-09 - 2019-12-15), name = done] +Skipping invalidated archive 6, segment '' is not in --force-idsegments: [idinvalidation = 6, idsite = 1, period = week(2019-12-09 - 2019-12-15), name = done] +Skipping invalidated archive 2, segment '' is not in --force-idsegments: [idinvalidation = 2, idsite = 1, period = week(2019-12-09 - 2019-12-15), name = done] +Skipping invalidated archive 51, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 51, idsite = 1, period = week(2019-12-09 - 2019-12-15), name = done49a9440bd6dba4b8850035e09d043c67] +Processing invalidation: [idinvalidation = 21, idsite = 1, period = week(2019-12-09 - 2019-12-15), name = donee0512c03f7c20af6ef96a8d792c6bb9f]. +Skipping invalidated archive 13, segment '' is not in --force-idsegments: [idinvalidation = 13, idsite = 1, period = day(2019-12-02 - 2019-12-02), name = done] +Skipping invalidated archive 47, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 47, idsite = 1, period = day(2019-12-02 - 2019-12-02), name = done49a9440bd6dba4b8850035e09d043c67] +Processing invalidation: [idinvalidation = 17, idsite = 1, period = day(2019-12-02 - 2019-12-02), name = donee0512c03f7c20af6ef96a8d792c6bb9f]. +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 14, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 48, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = done49a9440bd6dba4b8850035e09d043c67] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 18, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 15, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 11, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 7, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 3, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 49, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 19, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 62, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 32, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +No next invalidated archive. +Starting archiving for ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2019-12-09&format=json&segment=actions%3E%3D2&trigger=archivephp +Starting archiving for ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2019-12-02&format=json&segment=actions%3E%3D2&trigger=archivephp +Archived website id 1, period = week, date = 2019-12-09, segment = 'actions%3E%3D2', 0 visits found. Time elapsed: %fs +Archived website id 1, period = day, date = 2019-12-02, segment = 'actions%3E%3D2', 0 visits found. Time elapsed: %fs +Invalidations currently exist for idSite 1, skipping invalidating for now... +Skipping invalidated archive 14, segment '' is not in --force-idsegments: [idinvalidation = 14, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = done] +Skipping invalidated archive 48, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 48, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = done49a9440bd6dba4b8850035e09d043c67] +Processing invalidation: [idinvalidation = 18, idsite = 1, period = week(2019-12-02 - 2019-12-08), name = donee0512c03f7c20af6ef96a8d792c6bb9f]. +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 15, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 11, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 7, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 3, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 49, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 19, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 62, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 32, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +No next invalidated archive. +Starting archiving for ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2019-12-02&format=json&segment=actions%3E%3D2&trigger=archivephp +Archived website id 1, period = week, date = 2019-12-02, segment = 'actions%3E%3D2', 0 visits found. Time elapsed: %fs +Invalidations currently exist for idSite 1, skipping invalidating for now... +Skipping invalidated archive 15, segment '' is not in --force-idsegments: [idinvalidation = 15, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Skipping invalidated archive 11, segment '' is not in --force-idsegments: [idinvalidation = 11, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Skipping invalidated archive 7, segment '' is not in --force-idsegments: [idinvalidation = 7, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Skipping invalidated archive 3, segment '' is not in --force-idsegments: [idinvalidation = 3, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done] +Skipping invalidated archive 49, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 49, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] +Processing invalidation: [idinvalidation = 19, idsite = 1, period = month(2019-12-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f]. +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 62, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] +Found archive with intersecting period with others in concurrent batch, skipping until next batch: [idinvalidation = 32, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f] +No next invalidated archive. +Starting archiving for ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2019-12-01&format=json&segment=actions%3E%3D2&trigger=archivephp +Archived website id 1, period = month, date = 2019-12-01, segment = 'actions%3E%3D2', 0 visits found. Time elapsed: %fs +Invalidations currently exist for idSite 1, skipping invalidating for now... +Skipping invalidated archive 16, segment '' is not in --force-idsegments: [idinvalidation = 16, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Skipping invalidated archive 12, segment '' is not in --force-idsegments: [idinvalidation = 12, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Skipping invalidated archive 8, segment '' is not in --force-idsegments: [idinvalidation = 8, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Skipping invalidated archive 4, segment '' is not in --force-idsegments: [idinvalidation = 4, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done] +Skipping invalidated archive 62, segment 'actions>=4' is not in --force-idsegments: [idinvalidation = 62, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = done49a9440bd6dba4b8850035e09d043c67] +Processing invalidation: [idinvalidation = 32, idsite = 1, period = year(2019-01-01 - 2019-12-31), name = donee0512c03f7c20af6ef96a8d792c6bb9f]. +No next invalidated archive. +Starting archiving for ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2019-01-01&format=json&segment=actions%3E%3D2&trigger=archivephp +Archived website id 1, period = year, date = 2019-01-01, segment = 'actions%3E%3D2', 0 visits found. Time elapsed: %fs +Invalidations currently exist for idSite 1, skipping invalidating for now... +No next invalidated archive. +Finished archiving for site 1, 5 API requests, Time elapsed: %fs [1 / 1 done] +No more sites left to archive, stopping. +Done archiving! +--------------------------- +SUMMARY +Processed 5 archives. +Total API requests: 5 +done: 5 req, %d ms, no error +Time elapsed: %fs +LOG; $this->assertStringMatchesFormat($expected, $logger->output); } @@ -439,11 +593,11 @@ LOG; --------------------------- START Starting Matomo reports archiving... +Start processing archives for site 1. Checking for queued invalidations... Today archive can be skipped due to no visits for idSite = 1, skipping invalidation... Yesterday archive can be skipped due to no visits for idSite = 1, skipping invalidation... Done invalidating -Start processing archives for site 1. No next invalidated archive. LOG; diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__ExamplePlugin.getExampleArchivedMetric_month.xml b/tests/PHPUnit/System/expected/test_ImportLogs__ExamplePlugin.getExampleArchivedMetric_month.xml index 043911003e..fc1926ea4c 100644 --- a/tests/PHPUnit/System/expected/test_ImportLogs__ExamplePlugin.getExampleArchivedMetric_month.xml +++ b/tests/PHPUnit/System/expected/test_ImportLogs__ExamplePlugin.getExampleArchivedMetric_month.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> <result> <ExamplePlugin_example_metric>12814</ExamplePlugin_example_metric> - <ExamplePlugin_example_metric2>520</ExamplePlugin_example_metric2> + <ExamplePlugin_example_metric2>0</ExamplePlugin_example_metric2> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__ExamplePlugin.getExampleArchivedMetric_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__ExamplePlugin.getExampleArchivedMetric_day.xml index 7422ab593f..73490dca1f 100644 --- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__ExamplePlugin.getExampleArchivedMetric_day.xml +++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__ExamplePlugin.getExampleArchivedMetric_day.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" ?> <result> <ExamplePlugin_example_metric>2316</ExamplePlugin_example_metric> - <ExamplePlugin_example_metric2>55</ExamplePlugin_example_metric2> + <ExamplePlugin_example_metric2>0</ExamplePlugin_example_metric2> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryReports.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryReports.xml index 49c658ccfc..622d25675b 100644 --- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryReports.xml +++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getGlossaryReports.xml @@ -159,4 +159,4 @@ <name>Websites (Referrers)</name> <documentation>In this table, you can see which websites referred visitors to your site. <br /> By clicking on a row in the table, you can see which URLs the links to your website were on.</documentation> </row> -</result> +</result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml index c36aa73e2f..5a01f47b48 100644 --- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml +++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml @@ -256,7 +256,7 @@ <module>UserLanguage</module> <action>getLanguage</action> <dimension>Language</dimension> - <documentation>This report shows which language the visitor's browsers are using. (e.g. "English")</documentation> + <documentation>This report shows which language the visitor's browsers are using. (e.g. "English")</documentation> <metrics> <nb_visits>Visits</nb_visits> <nb_uniq_visitors>Unique visitors</nb_uniq_visitors> @@ -335,7 +335,7 @@ <module>UserLanguage</module> <action>getLanguageCode</action> <dimension>Language</dimension> - <documentation>This report shows which exact language code the visitor's browsers is set to. (e.g. "German - Austria (de-at)")</documentation> + <documentation>This report shows which exact language code the visitor's browsers is set to. (e.g. "German - Austria (de-at)")</documentation> <metrics> <nb_visits>Visits</nb_visits> <nb_uniq_visitors>Unique visitors</nb_uniq_visitors> @@ -2726,4 +2726,4 @@ <imageGraphEvolutionUrl>index.php?module=API&method=ImageGraph.get&idSite=1&apiModule=API&apiAction=get&period=day&date=2008-12-06,2009-01-04</imageGraphEvolutionUrl> <uniqueId>API_get</uniqueId> </row> -</result> +</result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__Live.getLastVisitsDetails_range.xml b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__Live.getLastVisitsDetails_range.xml index bf72456eda..6945cf1795 100644 --- a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__Live.getLastVisitsDetails_range.xml +++ b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__Live.getLastVisitsDetails_range.xml @@ -13,7 +13,6 @@ <pageTitle /> <pageIdAction>6</pageIdAction> - <pageId>5</pageId> <bandwidth /> <pageviewPosition /> @@ -138,7 +137,6 @@ <revenue>1000</revenue> <goalPageId /> - <url>http://example.org/homepage</url> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> @@ -152,7 +150,6 @@ <pageTitle>Homepage</pageTitle> <pageIdAction>2</pageIdAction> - <pageId>4</pageId> <bandwidth /> <pageviewPosition>1</pageviewPosition> @@ -277,7 +274,6 @@ <revenue>0</revenue> <goalPageId /> - <url>http://example.org/homepage</url> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> @@ -291,7 +287,6 @@ <pageTitle>Homepage</pageTitle> <pageIdAction>2</pageIdAction> - <pageId>1</pageId> <bandwidth /> <timeSpent>360</timeSpent> @@ -311,7 +306,6 @@ <revenue>0</revenue> <goalPageId /> - <url>http://example.org/user/profile</url> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> @@ -325,7 +319,6 @@ <pageTitle>Profile page</pageTitle> <pageIdAction>4</pageIdAction> - <pageId>2</pageId> <bandwidth /> <timeSpent>0</timeSpent> @@ -354,7 +347,6 @@ <pageTitle>Profile page for user *_)%</pageTitle> <pageIdAction>4</pageIdAction> - <pageId>3</pageId> <bandwidth /> <pageviewPosition>3</pageviewPosition> diff --git a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__Live.getLastVisitsDetails_range.xml b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__Live.getLastVisitsDetails_range.xml index bf72456eda..6945cf1795 100644 --- a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__Live.getLastVisitsDetails_range.xml +++ b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__Live.getLastVisitsDetails_range.xml @@ -13,7 +13,6 @@ <pageTitle /> <pageIdAction>6</pageIdAction> - <pageId>5</pageId> <bandwidth /> <pageviewPosition /> @@ -138,7 +137,6 @@ <revenue>1000</revenue> <goalPageId /> - <url>http://example.org/homepage</url> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> @@ -152,7 +150,6 @@ <pageTitle>Homepage</pageTitle> <pageIdAction>2</pageIdAction> - <pageId>4</pageId> <bandwidth /> <pageviewPosition>1</pageviewPosition> @@ -277,7 +274,6 @@ <revenue>0</revenue> <goalPageId /> - <url>http://example.org/homepage</url> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> @@ -291,7 +287,6 @@ <pageTitle>Homepage</pageTitle> <pageIdAction>2</pageIdAction> - <pageId>1</pageId> <bandwidth /> <timeSpent>360</timeSpent> @@ -311,7 +306,6 @@ <revenue>0</revenue> <goalPageId /> - <url>http://example.org/user/profile</url> <icon>plugins/Morpheus/images/goal.png</icon> <iconSVG>plugins/Morpheus/images/goal.svg</iconSVG> @@ -325,7 +319,6 @@ <pageTitle>Profile page</pageTitle> <pageIdAction>4</pageIdAction> - <pageId>2</pageId> <bandwidth /> <timeSpent>0</timeSpent> @@ -354,7 +347,6 @@ <pageTitle>Profile page for user *_)%</pageTitle> <pageIdAction>4</pageIdAction> - <pageId>3</pageId> <bandwidth /> <pageviewPosition>3</pageviewPosition> |