Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
node and user module assumes that DrupalDefaultEntityController::resetCache() only handles a static cache, therefore it's safe to call inside the transaction of user_save() and node_save().
However, it's possible to override the entity controller through hook_entity_info_alter(), thereby invalidating the beforementioned assumption.
When using Entity Cache with a non-db backend, there's the possibility of having the cache repopulated with old data in high concurrenty environments.
Patch coming up ...
Comment | File | Size | Author |
---|---|---|---|
#1 | 1941208-1-entity-cache.patch | 2.01 KB | gielfeldt |
Comments
Comment #1
gielfeldt CreditAttribution: gielfeldt commentedComment #3
gielfeldt CreditAttribution: gielfeldt commented#1: 1941208-1-entity-cache.patch queued for re-testing.
Comment #5
gielfeldt CreditAttribution: gielfeldt commentedDon't know why this doesn't pass ...
Comment #6
R-omk CreditAttribution: R-omk commentedIn any case in general a transaction may be nested, therefore, such changes are not enough.
Need a common mechanism at the transaction level.
Same problem in the 8.x branch.
Comment #7
gielfeldt CreditAttribution: gielfeldt commentedYeah, I know. Cache operations should follow the transactions. I realized this later on. Perhaps we should just close this issue?
Comment #8
gielfeldt CreditAttribution: gielfeldt commentedEssentially a duplicate of #1679344: Race condition in node_save() when not using DB for cache_field