[SERVER-51051] ReadThroughCache might not shut down properly with concurrent invalidate Created: 18/Sep/20  Updated: 29/Oct/23  Resolved: 23/Sep/20

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

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:
  1. A refresh starts, marking the entry as valid
  2. An invalidate is called, marking the entry as invalid
  3. The threadpool is shutdown, causing the lookup to be canceled
  4. When trying to cancel all outstanding operations, an invariant fails
Sprint: Sharding 2020-09-21, Sharding 2020-10-05
Participants:
Linked BF Score: 68

 Description   

If a refresh started and just after that, a shutdown occurs, there is a conflict with any concurrent invalidate that might happen, because it will cancel the ongoing refresh and in turn, will hit an invariant that checks if the entry is valid before removing all outstanding operations. Make a unit test to check this behavior.

It is safe to remove that invariant, this scenario only happens when shutting down.



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

Author:

{'name': 'Marcos José Grillo Ramírez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-51051 Make ReadThroughCache handle canceled lookups on shutdown
Branch: master
https://github.com/mongodb/mongo/commit/bd47e945b2f9d892be5f119adfa1937555e67c80

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