Details
-
Type: Bug
-
Status: In Quality Assurance
-
Priority: Trivial
-
Resolution: Unresolved
-
Affects Version/s: 4.5
-
Fix Version/s: Unscheduled
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Epic Link:
-
Funding Source:Needs Funding
Description
I have a CiviCRM with nearly 300 smart groups (and growing).
Those groups could take several seconds to update so i need to refresh them only once in a while using Scheduled Job "Rebuild Smart Group Cache" with a limit setted to 15.
The cron run once per hour and the scheduled job is defined to run Always.
After several days, i have noticed that some smart groups were not updated and yet the scheduled job seems to run fine.
By debugging, it seems that civicrm_group.cache_date and civicrm_cache.refresh_date are always null which make the "order by" clause to fail giving an arbitrary set of group each time.
Digging further, it's seems that when the scheduled job is ran, the process go a multiple time through updateCacheTime. The first time with argurment processed=1 which set the cache_date properly, and the next times with processed=0 which set the cache_date to null.
I don't understand why we even reset the cache_date. It seem like a good idea to always have the latest time the smart group was cached. Am i missing something ?
I will do a test to see if the problem persist in CiviCRM 4.6.
Attachments
Issue Links
- supplements
-
CRM-17463 Deadlocks on group_cache clearing
- Done/Fixed
- links to