[SERVER-50952] Ensure that cached collection entries with stale-marked shard will be eventually refreshed Created: 15/Sep/20  Updated: 29/Oct/23  Resolved: 21/Sep/20

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

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

Issue Links:
Depends
Problem/Incident
is caused by SERVER-46199 Implement collection cache on top of ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-09-21, Sharding 2020-10-05
Participants:
Linked BF Score: 0

 Description   

Suppose that we set a shard stale on a cached collection entry and then we try to advance the time for that entry with an older version w.r.t. the one already cached.
Until another advance time or invalidation will be called for that specific entry, it will remain with a shard marked as stale but won't be refreshed because it is already at the latest known version.

To fix this we need to ensure that shards on a cached collection entry are marked stale only if we are sure that a lookup will be triggered at the next access. In order to enforce this, we can make the advanceTimeInStore return a boolean that indicates if the time has been actually advanced or not, and then use this boolean to conditionally mark the shard as stale.



 Comments   
Comment by Githook User [ 21/Sep/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-50952 Ensure that cached collection entries with stale-marked shard will be eventually refreshed
Branch: master
https://github.com/mongodb/mongo/commit/1ccff1fdee9edfd99109e1e508ecdddbe06c3bc4

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