Re:Cache made consistent: Meta’s cache invalidation solution
by i_r7al on Wednesday June 08, 2022 @10:05PM
(#31676841)
> delaying performing the compute-intensive operation until an inconsistent sample crosses the reporting timescale
Could this delay cause a wrong reporting? Since the source of truth (the DB) could already received multiple mutate events of the data Polaris trying to verify? How do you handle this case?
Re:Cache made consistent: Meta’s cache invalidation solution
by uvdn7 on Wednesday June 08, 2022 @10:16PM
(#31676905)
No actually. When a sample has crossed the reporting timescale, and it's inconsistent. Regardless of if the db changes later or cache becomes consistent later, at the moment it's still an anomaly (inconsistency in this case).
> what about many-to-many where one fetch returns inconsistent results Are you referring to the case when cache stores a complicated result of a function that fetches data from many sources, and how to figure out when to invalidate? If so, I am sorry but that's not the cache invalidation I was referring to. (https://news.ycombinator.com/item?id=31676102)
> What about data queried while there's a transaction rollback.. when is it updated in the cache
This might be easier to answer. I assume if you run the database with isolation level higher than read-committed, you will be fine.