-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 1.29.5
-
Component/s: None
-
None
-
2
-
None
-
None
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.