[SERVER-44060] Make stats contain un-started collections and databases Created: 17/Oct/19  Updated: 29/Oct/23  Resolved: 02/Dec/19

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

Type: Task Priority: Major - P3
Reporter: Matthew Russotto Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2019-12-02, Repl 2019-12-16
Participants:

 Description   

In 4.2, the database and collection stats included databases not started and collections not started in the current database. This was broken during the refactor; we should fix that.

We should also reduce the time taken by the InitialSyncerTest GetInitialSyncProgressOmitsClonerStatsIfClonerStatsExceedBsonLimit unit test as part of this ticket.



 Comments   
Comment by Githook User [ 02/Dec/19 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@mongodb.com'}

Message: SERVER-44060 Make stats contain un-started collections and databases.
Branch: master
https://github.com/mongodb/mongo/commit/4a57893567fc15eda83950bd429abadafbd8c190

Comment by Matthew Russotto [ 18/Nov/19 ]

Original description:
The initial syncer has a very deep locking graph. This is caused by trying to get the statistics, which requires locking the initial syncer and each of the three cloners in turn. If we move the statistics to InitialSyncSharedData and use the InitialSyncSharedData lock to control access, we can simplify the locking.


This probably isn't a good idea as described; protecting everything with one big mutex means every time we get the stats (which FTDC does regularly) we'll freeze the initial sync for the time it takes to copy all the stats, which could be a considerable amount of time for DBs with large number of collections.

Generated at Thu Feb 08 05:04:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.