[SERVER-55647] shard-local db and collection caches may not contain timestamps after upgrade in the presence of configsvr stepdowns Created: 30/Mar/21  Updated: 29/Oct/23  Resolved: 27/Apr/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: PM-1965-Milestone-0-Metadata-Format
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-53104 Ensure all shard-local cache collecti... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

In SERVER-53104 we make the configsvr tell the shards to refresh their db/collection caches after patching up the configsvr metadata as part of FCV upgrade.

In the presence of configsvr stepdowns, it cannot be ensured that the shard-local caches will be refreshed. Consider the following situation:

  1. Configsvr patches up config.databases to $set the 'timestamp' field. Then configsvr crashes here.
  2.  On the next setFCV invocation, ShardingCatalogManager::_createDBTimestampsFor49 will be ran again, but it won't find any document in config.databases that matches the query '{timestamp: {$exists: false}}', so this tellShardsToRefreshDatabase won't execute because 'dbDocs' will be empty.

This same situation can happen for config.collections refresh here and here.



 Comments   
Comment by Githook User [ 27/Apr/21 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-55647 shard-local db and collection caches may not contain timestamps after upgrade in the presence of configsvr stepdowns
Branch: master
https://github.com/mongodb/mongo/commit/c6101de441fbd0550eacc8373f41aa43dd855521

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