[SERVER-62152] Investigate hang in unit tests when ShardRegistry reload on fixed executor Created: 17/Dec/21  Updated: 06/Dec/22  Resolved: 03/Feb/22

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

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Won't Fix Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File backtrace_hang.txt    
Issue Links:
Related
related to SERVER-63270 Complete TODO listed in SERVER-62152 Closed
Assigned Teams:
Sharding EMEA
Operating System: ALL
Participants:

 Description   

The AsyncTry for reloading the ShardRegistry is causing hangs in some unit tests. As a temporary solution, it was needed to commit a special case only for unit tests performing a synchronous reload.

For example, by just keeping the async reload, MigrationDestinationManagerGetIndexesAndCollectionsNoVersionsOrReadConcern is hanging after logging this line:

{"t":{"$date":"2021-12-17T19:44:55.138Z"},"s":"I",  "c":"NETWORK",  "id":5440600, "ctx":"ShardRegistry-0","msg":"Scheduling request","attr":{"when":{"$date":"1970-01-01T00:00:00.001Z"},"request":"RemoteCommand 2 -- target:[DummyConfig:1234] db:config expDate:1970-01-01T00:00:30.001+00:00 cmd:{ find: \"shards\", maxTimeMS: 30000, readConcern: { level: \"majority\", afterOpTime: { ts: Timestamp(0, 0), t: -1 } } }"}}

Attaching backtrace of the hang. The thread is stuck waiting on this condition variable



 Comments   
Comment by Githook User [ 15/Feb/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-63270 Complete TODO listed in SERVER-62152
Branch: master
https://github.com/mongodb/mongo/commit/c54aa67c44f81d3a1ea8fc3832c88eec41cda36b

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