[COMPASS-3842] Compass connects to wrong cluster for certain db's when disconnected from one cluster and then connecting to a different cluster with identical db and collection names Created: 22/Aug/19  Updated: 29/Oct/23  Resolved: 25/Sep/19

Status: Closed
Project: Compass
Component/s: Compass, Connectivity
Affects Version/s: 1.19.3
Fix Version/s: 1.20.0

Type: Bug Priority: Major - P3
Reporter: Robert Molenhouse Assignee: Durran Jordan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10 Professional 64bit, Compass V1.19.3


Attachments: PNG File Compass, wrong connection.PNG     File this-is-a-fun-one.mov    
Sprint: Iteration Manatee, Iteration Newt

 Description   

If I connect to one cluster (have tries local and atlas) and then disconnect in compass (menu bar >> connect >> disconnect) and then connect to a different cluster, any databases that have the same name and any of the same collections are still connected to the first cluster.

Here's an example.  I have an atlas cluster when my production db's live.  I also have a local mongod running on my localhost, I have some dbs and collections that are named the same on both servers.  Sometimes I pull production data to my localhost to test.  If I connect to my atlas cluster in compass, and then disconnect and connect to my localhost in compass without closing compass, the dbs and collections in my localhost that are named the same as in atlas, will still be connected to atlas and not my localhost.

 

So when I think I am connected to my localhost, I am actually connected to my production atlas, but only for the dbs and collections that are named the same.

See screenshot below, where compass is connected to LocalHost, but DB is pointing to Atlas Cluster.



 Comments   
Comment by Githook User [ 25/Sep/19 ]

Author:

{'name': 'Durran Jordan', 'username': 'durran', 'email': 'durran@gmail.com'}

Message: COMPASS-3842: Clear collection tabs on disconnect
Branch: 1.20-releases
https://github.com/mongodb-js/compass/commit/bb94bcb86f5469e4f52e946ec78a5d664aab510b

Comment by Githook User [ 25/Sep/19 ]

Author:

{'username': 'durran', 'email': 'durran@gmail.com', 'name': 'Durran Jordan'}

Message: COMPASS-3842: Clear collection tabs on disconnect
Branch: master
https://github.com/mongodb-js/compass/commit/9ea73cafe534d95c306bbaa8fcd650aeb7e26445

Comment by Githook User [ 25/Sep/19 ]

Author:

{'name': 'Durran Jordan', 'username': 'durran', 'email': 'durran@gmail.com'}

Message: COMPASS-3842: Clear collection tabs on disconnect
Branch: COMPASS-3842
https://github.com/mongodb-js/compass/commit/5f915a71f4382c4489153d7698afe52cd5a69f42

Generated at Wed Feb 07 22:34:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.