Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-62152

Investigate hang in unit tests when ShardRegistry reload on fixed executor

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Sharding EMEA
    • ALL

      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

            Assignee:
            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: