-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
Sharding 2020-06-01
The ReadThroughCache has a strict and clear contract around calls to invalidate, but the behaviour of advanceTimeInStore is under-specified with respect to keys getting deleted or appearing in the underlying store.
The behaviour should be:
- If Key is in the cache and then disappears from the underlying store, all acquire calls that follow the call to advanceTimeInStore which reflects the deletion, must keep refreshing from the store and returning an empty ValueHandle. Any already returned ValueHandle(s) will have isValid() == false per the contract of advanceTimeInStore.
- If Key is not in the cache and then gets inserted in the underlying store, all acquire calls that follow the call to advanceTimeInStore which reflects the insertion, must return a valid ValueHandle.