Skip to content

Fix handling of range invalidations during intersecting period check #23127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 14, 2025

Conversation

mneudert
Copy link
Member

@mneudert mneudert commented Mar 13, 2025

Description:

During the intersection period check, a check that involves range period invalidations can lead to an exception, preventing further archiving until that invalidation is either reset or finished.

Exception: General_ExceptionInvalidDateRange

/home/runner/work/matomo/matomo/matomo/core/Period/Range.php:275
/home/runner/work/matomo/matomo/matomo/core/Period.php:132
/home/runner/work/matomo/matomo/matomo/core/Period/Range.php:153
/home/runner/work/matomo/matomo/matomo/core/Period.php:274
/home/runner/work/matomo/matomo/matomo/core/CronArchive/QueueConsumer.php:474
/home/runner/work/matomo/matomo/matomo/core/CronArchive/QueueConsumer.php:447

Should be backported to 5.3.x-dev!

Review

@mneudert mneudert force-pushed the intersecting-range-invalidation branch 2 times, most recently from ee57a4f to 77c1f10 Compare March 13, 2025 16:51
@mneudert mneudert force-pushed the intersecting-range-invalidation branch from 77c1f10 to ab94fe4 Compare March 13, 2025 17:23
@mneudert mneudert added this to the 5.4.0 milestone Mar 13, 2025
@mneudert mneudert added Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review labels Mar 13, 2025
@mneudert mneudert requested a review from a team March 13, 2025 18:07
@michalkleiner michalkleiner self-assigned this Mar 13, 2025
michalkleiner
michalkleiner previously approved these changes Mar 13, 2025
Copy link
Contributor

@michalkleiner michalkleiner left a comment

Choose a reason for hiding this comment

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

Nice catch, good addition to the tests as well. Approving with a minor suggestion where I had to read the condition twice to only find out it's the same thing as the variable.

@michalkleiner michalkleiner removed their assignment Mar 13, 2025
Co-authored-by: Michal Kleiner <michal@innocraft.com>
@sgiehl sgiehl merged commit ed1df0c into 5.x-dev Mar 14, 2025
23 of 27 checks passed
@sgiehl sgiehl deleted the intersecting-range-invalidation branch March 14, 2025 19:30
sgiehl pushed a commit that referenced this pull request Mar 14, 2025
…23127)

* Add ranges to intersecting period checks

* Fix intersecting period handling for ranges

* Update core/CronArchive/QueueConsumer.php

Co-authored-by: Michal Kleiner <michal@innocraft.com>

---------

Co-authored-by: Michal Kleiner <michal@innocraft.com>
@sgiehl sgiehl linked an issue Mar 17, 2025 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review
Development

Successfully merging this pull request may close these issues.

[Bug] The date is not a correct date range exception when running archive command
3 participants