[SERVER-48404] Unclear contract of ReadThroughCache around transitions between "Key Found" and "Key NOT Found" Created: 26/May/20  Updated: 29/Oct/23  Resolved: 28/May/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-06-01
Participants:

 Description   

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.


 Comments   
Comment by Githook User [ 28/May/20 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-48404 Fix ReadThroughCache edge cases around Key Found/Key NOT Found
Branch: master
https://github.com/mongodb/mongo/commit/86c6d003cc3c808b1b126ae701551c2a5ef97915

Generated at Thu Feb 08 05:17:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.