[SERVER-49189] Make the ReadThroughCache lookup send the old entry state to the lookup function Created: 30/Jun/20  Updated: 29/Oct/23  Resolved: 23/Jul/20

Status: Closed
Project: Core Server
Component/s: Catalog, Sharding
Affects Version/s: Backlog
Fix Version/s: 4.7.0

Type: Task Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Kevin Pulo
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-46202 Implement ShardRegistry on top of Rea... Closed
is depended on by SERVER-49856 Make DatabaseCache causally consisten... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-07-13, Sharding 2020-06-29, Sharding 2020-07-27
Participants:

 Description   

The ReadThroughCache lookup function can return a LookupResult with a value of boost::none to inicate the lookup didn't found any result. As written in this comment, in those cases the time field of the LookupResult need to reflect the time for which the lookup request was issued. The problem is that in the scope of the LookupFn we don't have such a value, we only knows the key for which the lookup have been issued but not the time at which it was issued.

Moreover this will be required in order to use the ReadThroughCache to store collection routing information. In fact the future lookup function of such instantiation will need access to the old routing information previously cached in order to perform an incremental refresh.



 Comments   
Comment by Githook User [ 27/Jul/20 ]

Author:

{'name': 'Kevin Pulo', 'email': 'kevin.pulo@mongodb.com', 'username': 'devkev'}

Message: SERVER-49189 add missed minor tweaks
Branch: master
https://github.com/mongodb/mongo/commit/21a3ee6079eb3cc83a5210cf53d98840cbc83a20

Comment by Githook User [ 23/Jul/20 ]

Author:

{'name': 'Kevin Pulo', 'email': 'kevin.pulo@mongodb.com', 'username': 'devkev'}

Message: SERVER-49189 pass current cachedValue (and time, if causally consistent) to ReadThroughCache::LookupFn
Branch: master
https://github.com/mongodb/mongo/commit/6b5b168edf19e336dacff0a8c54a9dd1f32ed1e2

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