[SERVER-68857] Create aggregation stage $allCollectionStats Created: 16/Aug/22  Updated: 01/Nov/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Pol Castuera (Inactive) Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
Assigned Teams:
Query Execution
Participants:

 Description   

We could introduce a new aggregation stage $allCollectionStats. This data source would present a data stream of all collection stats for all collections. 

  • This stage actually exists but it is internal ($_internalAllCollectionStats).
  • We should make $allCollectionStats accept, at least, same specifications as $collStats. (Done in PM-2934).

{
 $_internalAllCollectionStats: {
   stats: { /* This is the DocumentSourceCollStatsSepc object */
     latencyStats: { histograms: <boolean> },
     storageStats: { scale: <number> },
     count: {},
     queryExecStats: {}
   }
 }
}
])

* $allCollectionStats seemed like something the cloud team would be interested in for other projects also.

At the moment we make this aggregation stage public it should be documented as "New in version x.y" and notify downstream attention.



 Comments   
Comment by Steve Tarzia [ 05/Dec/22 ]

james.wahlin@mongodb.com, FYI $_internalAllCollectionStats is yet another interface added by another team for accessing collection stats. Since your team is working on stats, we wanted to bring this to your attention.  It would be good for query to review all the different mechanisms for stats access, as there seems to be some redundancy due to independent work of various teams.

cc: david.storch@mongodb.com 

Comment by Charlie Swanson [ 02/Dec/22 ]

jonathan.balsano@mongodb.com's team may be interested in this (I think I recall that from previous conversations?). Also I think the compass team expressed interest in something similar, though I can't find a ticket about it. I remember something about "it's hard to get a list of all collections and all databases" for their sidebar tab.

Generated at Thu Feb 08 06:11:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.