Created
April 2, 2021 06:44
-
-
Save Happytreat/847bfec27cc68dcad9dacf158bbb0292 to your computer and use it in GitHub Desktop.
Race Condition 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credits to https://pdos.csail.mit.edu/6.824/notes/l-memcached.txt | |
k not in cache | |
C1 get(k), misses | |
C1 v1 = read k from DB | |
C2 writes k = v2 in DB | |
C2 delete(k) | |
C1 set(k, v1) | |
now mc has stale data, delete(k) has already happened | |
will stay stale indefinitely, until k is next written |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment