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 ...

CommentFileSizeAuthor
#1 1941208-1-entity-cache.patch2.01 KBgielfeldt
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gielfeldt’s picture

Status: Active » Needs review
FileSize
2.01 KB

Status: Needs review » Needs work

The last submitted patch, 1941208-1-entity-cache.patch, failed testing.

gielfeldt’s picture

Status: Needs work » Needs review

#1: 1941208-1-entity-cache.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1941208-1-entity-cache.patch, failed testing.

gielfeldt’s picture

Don't know why this doesn't pass ...

R-omk’s picture

Version: 7.x-dev » 8.x-dev
Component: entity system » cache system
Issue summary: View changes
Issue tags: +transaction cache resetCache

In 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.

gielfeldt’s picture

Yeah, I know. Cache operations should follow the transactions. I realized this later on. Perhaps we should just close this issue?

gielfeldt’s picture

Status: Needs work » Closed (duplicate)