Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5366

Commands to list databases and collections fails if primary is not available

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • 1.29.5
    • None
    • None
    • 2

    Description

      Step to reproduce:

      Connect to the sharded cluster configuration of https://github.com/mongodb-js/devtools-docker-test-envs

      Compass is taking a lot of time to get past the loading screen. In the logs there are failures like this "Could not find host matching read preference

      { mode: \"primary\" }

      for set shard0". The failed attempts seems to take 20 seconds and should be the cause of the delay:

      {"t":

      {"$date":"2021-12-15T11:11:50.242Z"}

      ,"s":"D1","c":"COMPASS-DATA-SERVICE","id":1001000030,"ctx":"Connection 14","msg":"Driver command failed","attr":{"address":"127.0.0.1:28004","serverConnectionId":1,"duration":20015,"commandName":"dbStats","failure":"Could not find host matching read preference

      { mode: \"primary\" }

      for set shard0"}}

      We may want to consider switching those commands to primary-preferred to allow usage of compass in read-only.

      Attachments

        Activity

          People

            Unassigned Unassigned
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: