Tweak behaviour of orphaned segments #14828
Labels
c: Performance
For when we could improve the performance / speed of Matomo.
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone
Weekly we have a cronjob to delete orphaned segments in
CoreAdminHome\Tasks
. Meaning we delete all segment archives of segments that no longer exist.This behaviour currently works like this:
Now that this command ran a few times and we have cleaned up all segment archives, and now that we implement a proper soft delete in #14826 we could make this behaviour more efficient:
deleted = 1 and ts_last_edit >= 1 week ago
(assuming we run the task weekly). These are the segments that were deleted last weekI was thinking we would only need to loop over archive tables since
ts_created
but we need to loop likely over all archive tables since some users will have enabled to automatically archive segments for all historical data which is also the defaultprocess_new_segments_from = "beginning_of_time"
This way things will be faster as we only execute logic if a segment was deleted
The text was updated successfully, but these errors were encountered: