We have a customer that reports this:
Piwik\Segment->__construct(dimension17==DE, Array ( => 1)) - that looks like Matomo is trying to load a segment from another idSite for Site 1, which will fail because idSite1 does not have a dimension17.
Here is the backtrace:
[32mINFO [2020-12-05 15:30:25] 8485 [39m Start processing archives for site 1. <a href='/0'>#0</a> Piwik\Segment->getSegmentByName(dimension17) called at [core/Segment.php:258] <a href='/1'>#1</a> Piwik\Segment->getExpressionsWithUnionsResolved(Array ( => Array ( => , => Array ( => dimension17, => ==, => DE)))) called at [core/Segment.php:236] <a href='/2'>#2</a> Piwik\Segment->initializeSegment(dimension17==DE, Array ( => 1)) called at [/var/app/current/core/Segment.php:145] <a href='/3'>#3</a> Piwik\Segment->__construct(dimension17==DE, Array ( => 1)) called at [core/CronArchive/SegmentArchiving.php:128] <a href='/4'>#4</a> Piwik\CronArchive\SegmentArchiving->findSegmentForHash(90a5a511e1974bca37613b6daec137ba, 1) called at [core/CronArchive/QueueConsumer.php:472] <a href='/5'>#5</a> Piwik\CronArchive\QueueConsumer->findSegmentForArchive(Array ([idinvalidation] => 210,[idarchive] => ,[idsite] => 1,[date1] => 2020-12-04,[date2] =>
@diosmosis can you check if it's possible that we invalidate entries for a segment for a wrong site somehow?
That's using 4.0.4