Currently FTDC takes out locks in two places (once when running WiredTiger and once when running with replication).
WiredTiger: https://github.com/mongodb/mongo/blob/1dc2afc8b5ce09d88535049df2ad72adc0434cc8/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp#L60
Replication: https://github.com/mongodb/mongo/blob/c1e7921e9d69bd9a37761deb58d119a324341a54/src/mongo/db/ftdc/ftdc_mongod.cpp#L47-L60 which calls into https://github.com/mongodb/mongo/blob/1dc2afc8b5ce09d88535049df2ad72adc0434cc8/src/mongo/db/stats/storage_stats.cpp#L57
Both can wait forever which can be undesirable for FDTC. Instead it may be useful to utilize "tryLocks" such that an FTDC round can make progress and output data despite some pieces blocking.
However such a change would also affect serverStatus output thus be an API change that can affect downstream callers.
- is related to
-
SERVER-70971 [v4.4] Backport skipping RSTL lock in serverStatus
- Closed
- related to
-
SERVER-58026 Omitted FTDC sections cause frequent schema changes that limit FTDC retention
- Backlog
-
SERVER-30790 ServerStatus on WiredTiger accesses the storage engine without any locks
- Closed
-
SERVER-59065 CatalogStats uses unsafe CollectionCatalog pointer during startup
- Closed