[SERVER-51390] Always refresh database cache on StaleDatabaseVersion Created: 06/Oct/20  Updated: 29/Oct/23  Resolved: 09/Oct/20

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

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

Attachments: File drop_database_stale_mongos.js    
Issue Links:
Depends
Problem/Incident
is caused by SERVER-49856 Make DatabaseCache causally consisten... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

The following js test reproduces the bug.

drop_database_stale_mongos.js

Participants:
Linked BF Score: 0

 Description   

If a mongos receives a StaleDatabaseVersion error, it refreshes its cache only if the shard attached a wantedVersion to the error. This prevent a stale mongos from discovering that a database have been dropped. In fact in this case the shards won't send any wanted version since the database doesn't exist anymore.

None of our current tests cover this scenario, so we should also add a test for this.



 Comments   
Comment by Githook User [ 09/Oct/20 ]

Author:

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

Message: SERVER-51390 Always refresh database cache on StaleDatabaseVersion
Branch: master
https://github.com/mongodb/mongo/commit/bb87a99d75a9b4c9abb5b32d4ac661a8eb9e60f1

Comment by Githook User [ 09/Oct/20 ]

Author:

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

Message: Revert "SERVER-51390 Always refresh database cache on StaleDatabaseVersion"

This reverts commit d81fb9e5c454f89b6c41099c8b8ce09c463344c6.
Branch: master
https://github.com/mongodb/mongo/commit/2fa5675cb699cd62c38aea9cb133b2069b524266

Comment by Tommaso Tocci [ 08/Oct/20 ]

ben.caimano I think you are right I'm going to revert this.

Comment by Githook User [ 08/Oct/20 ]

Author:

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

Message: SERVER-51390 Always refresh database cache on StaleDatabaseVersion
Branch: master
https://github.com/mongodb/mongo/commit/d81fb9e5c454f89b6c41099c8b8ce09c463344c6

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