[COMPASS-5316] Load dbStats and collInfo / collStats only for the visible items in the databases-collections list and in the sidenav Created: 23/Nov/21  Updated: 22/Jun/23  Resolved: 22/Jun/23

Status: Closed
Project: Compass
Component/s: State Management, Tech debt
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Sergey Petushkov Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by COMPASS-5119 Loading Compass with significant numb... Closed
is duplicated by COMPASS-5988 MongoDB Compass causes the replicaset... Closed
Related
is related to COMPASS-5988 MongoDB Compass causes the replicaset... Closed
Epic Link: COMPASS-6441
Documentation Changes: Not Needed

 Description   

Based on the Slack report for the support case https://support.mongodb.com/case/00851959, a few other mentions of the similar issue here and there, and recommended collections/indexes sizes in the Atlas doc we probably want Compass to not struggle at least when people are hitting the recommended maximums for those on the m20/30 Atlas clusters.

Currently we are seeing issues when cluster has more than 1k databases or collections in a single database, partially it's just browser struggling to render stuff on the screen, to some extent its views re-rendering even when they don't really need to due to plugins passing all the possible state around, but also it's because we are currently fetching all the data for all the databases and all the data for all the collections in the selected database at once, exhausting the driver connection pool, which means that even if you get through the app lag and manage to open the CRUD screen, you will not be able to fetch the data until all the previous requests in the pool finish.

One way to handle that would be to fetch data only for the databases and collections that you see on the screen and async load it when the items are scrolled into view.



 Comments   
Comment by Sergey Petushkov [ 22/Jun/23 ]

We are not going to make this a default behavior because this affects stats required for insights and sorting on the databases / collections lists

Comment by Anna Henningsen [ 28/Jul/22 ]

See also COMPASS-5988 – Compass can crash remote servers by making them run out of file descriptors through many simultaneous collStats calls.

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