[SERVER-36477] User Cache should not invalidate empty weak_ptrs Created: 06/Aug/18  Updated: 29/Oct/23  Resolved: 15/Aug/18

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: None
Fix Version/s: 4.1.3

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2018-08-27
Participants:
Linked BF Score: 12

 Description   

During invalidateIf, the cache will lock a weak_ptr and later attempt to invalidate it. https://github.com/mongodb/mongo/blob/b079e4713d897b5541c2804386025817ec720800/src/mongo/util/invalidating_lru_cache.h#L124

 

We should make sure that the lock happened successfully, before attempting further processing.



 Comments   
Comment by Githook User [ 15/Aug/18 ]

Author:

{'username': 'jbreams', 'email': 'jbreams@mongodb.com', 'name': 'Jonathan Reams'}

Message: SERVER-36477 Only invalidate valid ptrs in InvalidatingLRUCache
Branch: master
https://github.com/mongodb/mongo/commit/8eb9915c41108289e0aba79f1207a48bdfc784d8

Generated at Thu Feb 08 04:43:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.