[SERVER-50635] Index consistency check at end of sharding tests isn't robust to ShardNotFound Created: 29/Aug/20  Updated: 29/Oct/23  Resolved: 08/Sep/20

Status: Closed
Project: Core Server
Component/s: Sharding, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.7.0, 4.4.2

Type: Bug Priority: Minor - P4
Reporter: Max Hirschhorn Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Sharding 2020-09-21
Participants:
Linked BF Score: 0

 Description   

The balancing_sessions_collection.js intentionally removes one of the shards before shutting down the ShardingTest. It is possible for mongos to refresh its ShardRegistry after choosing to target all shards with the $indexStats aggregation and then triggers a ShardNotFound error.

One proposal to address this issue is to retry running the $indexStats aggregation on ShardNotFound errors.



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

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-50635 Retry index consistency check at ShardingTest shutdown on ShardNotFound errors

(cherry picked from commit 24ce8e9b42bc34d111999f516b8c5b2abedb8892)
Branch: v4.4
https://github.com/mongodb/mongo/commit/6e83937a699fb41374e129d889049b042249f413

Comment by Githook User [ 08/Sep/20 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-50635 Retry index consistency check at ShardingTest shutdown on ShardNotFound errors
Branch: master
https://github.com/mongodb/mongo/commit/24ce8e9b42bc34d111999f516b8c5b2abedb8892

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