Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago created an issue. See original summary.

fago’s picture

Issue summary: View changes

Adding planned improvements #2189645: Avoid full cache clear whenever a rules component or reaction rule is edited

  1. Rebuild component cache per component I think would be a good improvement - that way the operation will take less time and the lock will be more granular. I'd not updated it immediately though, such that the update operation of the cache triggers the proper lock.
  2. As the patch starts, same we can do for events: Rebuild them separately, thus resulting in more fine-granular locking. Looking up the locks one some life sites, most of them are in rules_event_whitelist - thus splitting that rebuild process up should help a lot.
  3. Related, I checked the queries for loading the uncached configuration and noted that the loading active reaction rules is not indexed (no index on 'active'). So we can improve this a bit also.
  4. Finally, rules_get_cache() locking has a re-duced wait time of 10 seconds but starts to duplicate efforts after it - what is counter-productive if the rebuild is not finished in time. Let's increase waiting time to the default of 30s.
fago’s picture

Status: Active » Needs review
FileSize
1015 bytes
644 bytes

Getting started, here are two first patch for the easy points 3+4.

fago’s picture

Version: 8.x-3.x-dev » 7.x-2.x-dev

ops.

fago’s picture

re-uploading with right version in issue

The last submitted patch, 3: d7_rules_index_active.patch, failed testing.

The last submitted patch, 3: d7_rules_lock-4.patch, failed testing.

fago’s picture

ok, moved the remaining work of 1+2 to #2189645: Avoid full cache clear whenever a rules component or reaction rule is edited and committed 3+4.

  • fago committed 3bf265f on 7.x-2.x
    Issue #2650886 by fago: Increase lock waiting time to avoid cache...

  • fago committed 1f2c06b on 7.x-2.x
    Issue #2650886 by fago: Add an index for retrieving active config of a...
fago’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.