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
disable cron task when segment is deleted #18383
Conversation
add function
update segment on cron when is deleted
not sure that's the right solution. but it should skip the segment mark as deleted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your approach won't work.
Also this would only solve one part of the requirements described here: #16152 (comment)
change to check segement
remove used function
update Segment availbel
@sgiehl right, that makes more sense now. Update a little bit, hopeful I am on the right direction :) |
This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers |
…deleted-cron-task-remove
update queue
trigger update
…deleted-cron-task-remove
remove plugin check
This reverts commit e059f4b.
remove the right part
Co-authored-by: Stefan Giehl <stefan@matomo.org>
@sgiehl Have a deep look at this one, if I am right I think a new function doesn't even needed, it seems like already checked in here. I guess it's somewhere else. matomo/core/CronArchive/SegmentArchiving.php Lines 83 to 104 in 8e1aabf
|
try simple solution
@peterhashair Were you actually able to reproduce the error that is described in the issue in any way? I have created a test case, that reflects the way I was able to reproduce. So the process that starts the archiving receives a segment from If you were able to reproduce that another way, feel free to add an additional test case for that as well. |
fix segment errors
@sgiehl I saw the new test, reproduced it. Should be fixed now. |
update tests
update tests
@peterhashair Actually you have adjusted the test case so it covers another problem. Disabling the plugin before the archiver runs, let's the archiver skip the segments. That actually was already the case before, even though the message was not that clear.
That actually happens if the archiver already started, but while looping over the archiving requests the plugin gets disabled. So a request for archiving an invalid segment is sent, causing the error above. I guess we need to ignore if a archiving request results in that specific error. And log an info about that instead. |
update tests
update tests and words
@sgiehl right, that makes more sense. Update a little. Hopefully is correct :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment. If it's to much effort to change that, I guess it should also be good to merge it that way.
update log info and tests
@sgiehl update the log info. 😀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
Description:
Fixes:#16152
disable cron task when segment is deleted
Review