upvote
Caching is not supposed to work like that, but that doesn’t preclude the cache key computation function from having bugs.
reply
Yeah there's quite a lot of potential bugs that could have this shape. If I were to guess it could be a buffer in a buffer pool not being sized and zeroed correctly, allowing stale data to bleed between sessions.
reply
or the cache retrieval function for a key retrieving the wrong entry
reply
There is a massive incentive for optimization, so I expect they’re doing a ton of very clever tricks, all of which make this kind of bug more likely.
reply
Hash functions necesarily have collisions. Also, it is perfectly possible to introduce bugs in the hash function (hash inputs, hash function itself) that allows cross account contamination.
reply
Hash functions necessarily have collisions, but it's perfectly possible to make the expected time between collisions greater than the human lifespan.
reply
There could just also be a bug where the output tokens of session 1 were shared with session 2, due to a race condition or similar.
reply