[SERVER-77509] CheckMetadataConsistencyInBackground hook is not robust to ShardNotFound Created: 26/May/23  Updated: 29/Oct/23  Resolved: 14/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc4

Type: Bug Priority: Major - P3
Reporter: Pol Pinol Assignee: Pol Pinol
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-78117 checkMetadataConsistency command is n... Backlog
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0
Sprint: Sharding EMEA 2023-06-26
Participants:
Linked BF Score: 20
Story Points: 2

 Description   

The clusterwide_ops_with_add_remove_shards.js verifies that those operations that must be run on all shards do not crash when adding or removing shards. As the CheckMetadataConsistencyInBackground is run concurrently with that jstest, it is possible for the mongos to refresh its ShardRegistry after choosing to target one shard, throwing ShardNotFound error.

One possible solution is to handle ShardNotFound error in the same way as CheckMetadataConsistencyInBackground does for retryable errors.



 Comments   
Comment by Githook User [ 15/Jun/23 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-77509 Make CheckMetadataConsistencyInBackground hook robust to ShardNotFound

(cherry picked from commit 748fc38a8e6bb2f3a86bae246ad58917ee74b2b3)
Branch: v7.0
https://github.com/mongodb/mongo/commit/dc21e4b27f042270d26964947d9c59757f1e0d76

Comment by Githook User [ 13/Jun/23 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-77509 Make CheckMetadataConsistencyInBackground hook robust to ShardNotFound
Branch: master
https://github.com/mongodb/mongo/commit/748fc38a8e6bb2f3a86bae246ad58917ee74b2b3

Generated at Thu Feb 08 06:35:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.