Commit a649dca
committed
Fixed expired key cleanup deleting concurrently refreshed values
The expired-entry cleanup in get() deleted by key alone, so between
reading an expired row and issuing the delete, a set() on another
instance could refresh the same key - and the delete would then remove
the brand-new value, making a successful write silently vanish until
the next set(). Scoping the delete to rows that are still expired
closes the race; the periodic cleanup in set() already guards its
delete the same way.1 parent 3bf878a commit a649dca
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
| |||
0 commit comments