level2
level2 copied to clipboard
Using read_entry for read_entry_from potentially reads stale entries
I'm reviewing the code for use in our projects and had a quick question.
Within level2 you are using the private read_entry
method. This means that L1 could return stale data which is sent up to read
and rails would then discard it and start a write (in the case of using fetch
).
We run into a problem where L1 may be stale, but L2 may not (due to a different machine writing it).
As it appears, the current code would cause a recalculation. Was this intentional?
Only downside I see is that by calling read
you are going to end up with a lot more notifications flying around.