entity
entity copied to clipboard
Investigate distributed reader-writer locks for entities
To guarantee cache consistency (and dataloader consistency) across a set of machines or even across requests and keep the read-through caching strategy that we employ, we'll need to implement some sort of distributed reader-writer lock for entities by type and ID.
Another interesting way to mitigate this temporarily but not theoretically fix it is to defer all cache invalidation to the end of the write transaction so that it becomes less likely to have a read-through cache inconsistency (though not impossible still obviously).