-
Notifications
You must be signed in to change notification settings - Fork 116
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
Old records are not being removed #1056
Comments
I can confirm, this is happening on one of our client site as well. Oldest records available are now from 2016. This site was not intended to have an eternal memory. |
I am starting review of this today and will carve out some time to investigate/fix this week. |
@kasparsd did you do any research into how the cron schedules run for deleting the logs. WordPress Cron is notorious for missing events without a dedicated native cron to trigger WordPress Cron. I have a suspicion this may be related to these records not being removed and posted a question in the WordPress support forum topic related to this issue. |
@kopepasah The method used for deleting the older logs is defined here: stream/classes/class-admin.php Lines 735 to 779 in d465e35
Notice that it has several conditionals which can stop the deletion from happening. I haven't verified if all of them work as expected. The stream/classes/class-admin.php Lines 724 to 728 in d465e35
There is also a test case for this method and it appears to be passing: stream/tests/tests/test-class-admin.php Lines 270 to 307 in 4c60b9c
|
@kasparsd @kopepasah I have done some testing and I can see that the plugin options are empty on my environments. stream/classes/class-admin.php Line 752 in d465e35
This is an empty array as the wp_stream option is not saved to the database.
After changing the values in the plugin settings and saving multiple times, it does update them and I can then run Whilst the event could run to completion on some environments and entries are removed, it does not work for a site that has 5,883,474 entries (294,174 pages) as it times out.
|
Reopening since #1159 has been reverted. |
From https://wordpress.org/support/topic/old-records-are-not-being-removed/
Duplicate reports:
The text was updated successfully, but these errors were encountered: