[SERVER-67959] Provide simple interface to statistics for use by CE Created: 11/Jul/22  Updated: 12/Aug/22  Resolved: 12/Aug/22

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

Type: Task Priority: Major - P3
Reporter: Joel Redman (Inactive) Assignee: Misha Tyulenev
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-68459 Implement StatsCacheLoader Closed
Sprint: QO 2022-07-25, QO 2022-08-08, QO 2022-08-22
Participants:

 Description   

The goal of this ticket is to bootstrap a method for CE to be able to get stats. The specific design details such as naming should be discussed with Timour, but for now a Collection object should provide an interface class to the stats collection.

 

class StatisticsInterface 
{
    // Returns the current document count for the collection
    size_t currentDocCount();
 
    // Returns the statistics object associated with a path
    Statistics getStatistics(std::string key, boost::optional<Collation> collation);
}
 

The interface class gets the number of documents in the collection at the time of creation and returns it from currentDocCount.

This interface class loads each stat on demand on the first call to getStatistics for a given path. Subsequent calls should return the same stats object, even if the underlying collection changes. Each interface class should have its own cache at this time.

See the design doc for information on storage and indexing.


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