Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use Archiver::getDependentSegmentsToArchive() in VisitFrequency (#20763)
* introduce RecordBuilder concept and re-organize Goals archiving code via RecordBuilders * fix loop iteration bug * split ecommerce records recordbuilder into 3 separate records * make sure Goals::getRecordMetadata() behaves like old archiver code * make sure recordbuilder archive processor is restored after being used since archiving is a recursive process * just make ArchiveProcessor a parameter * check for plugin before calling buildMultiplePeriod() * do not invoke record builders if archiver has no plugin (happens during tests) * insert empty DataTables (as this appears to be the existing behavior before this change) * add RecordBuilder class name to aggregation query hint * clear up in-source todo * attempt only archiving requested report if range archive and the record needed is created by a RecordBuilder * refactor ArchiveSelector::getArchiveIds() to provide result with string keys * when all found archives are partial archives, check that requested data is present within them. if some are not present, only archive those in a new partial archive. * return correct value in Model::getRecordsContainedInArchives() * fix if formatting * existingArchives can be falsy * existing archives can be null if the check is not relevant to the current archive request * do not archive dependent segments if only processing the specific requested report * fix more tests * fix LoaderTest * make sure if archiving specific reports for a single plugin that archiver class instances will not be created * add filterRecordBuilders event * if it looks like the requested records are numeric, prioritize the numeric archive table, otherwise blob archive table * fix copy-paste error * add dummy test for numeric values * add test for partial archiving of numeric records for ranges and fix typo causing this to fail * lessen code redundancy in Archive.php, use Piwik\\Request and do not yet mark RecordBuilder as api * fix type hint * fix php-cs errors * fix failing tests * fix failing tests (really) * Add Archiver::getDependentSegmentsToArchive() so plugins do not have to implement aggregation methods in Archiver to process dependent archives. * fix isEnabled calls * only add idarchive to Archive.php idarchive cache if it is not already there (makes debugging a little less confusing) * remove unneeded TODO * when forcing new archive because timestamp is too old, do not report any existing archives * report no existing archives if done flag is different + add tests * update uses of ARCHIVE_DEPENDENT static variable * allow dependent segments to specific different plugin than the one containing the archiver * add dependent segments to archive for VisitFrequency * add typehint * Update Archiver.php
- Loading branch information