[SERVER-30888] Have FTDC code paths obtain locks with a timeout. Created: 30/Aug/17  Updated: 30/Oct/23  Resolved: 01/Jun/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.7.0, 4.4.19

Type: Improvement Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Gregory Noma
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-13682 Investigate changes in SERVER-30888: ... Closed
Related
related to SERVER-58026 Omitted FTDC sections cause frequent ... Backlog
related to SERVER-30790 ServerStatus on WiredTiger accesses t... Closed
related to SERVER-59065 CatalogStats uses unsafe CollectionCa... Closed
is related to SERVER-70971 [v4.4] Backport skipping RSTL lock in... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Execution Team 2020-01-13, Execution Team 2020-06-01, Execution Team 2020-06-15
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 30/Nov/22 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-30888 Obtain locks with timeouts when collecting FTDC statistics
Branch: v4.4
https://github.com/mongodb/mongo/commit/ccc77166c2a601956a0df94b3c9c61d508f5ebb8

Comment by Githook User [ 01/Jun/20 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-30888 Obtain locks with timeouts when collecting FTDC statistics
Branch: master
https://github.com/mongodb/mongo/commit/d74e83b8ab66d4584d4ab2082ee9c123f35dbfd2

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