[SERVER-36437] The dbstats command should lock the database in MODE_IS instead of MODE_S Created: 03/Aug/18  Updated: 29/Oct/23  Resolved: 29/Nov/18

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: None
Fix Version/s: 3.6.12, 4.0.5, 4.1.6

Type: Improvement Priority: Major - P3
Reporter: Geert Bosch Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: bkp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-36428 WriteConflict inside a transaction on... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0, v3.6, v3.4
Sprint: Storage NYC 2018-12-03
Participants:
Case:

 Description   

Currently the dbstats command locks the database in MODE_S, which causes issues with transactions that may hold MODE_IX locks for extended periods of time. Similar to the changes we made for listCollections, we should instead lock the database in MODE_IS and then lock each collection in turn to get stats.



 Comments   
Comment by Githook User [ 26/Mar/19 ]

Author:

{'name': 'Xiangyu Yao', 'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com'}

Message: SERVER-36437 Use MODE_IS for dbstats

(cherry picked from commit 091ef080cdcfcbed720a536e57f5afd9b8a54b46)
Branch: v3.6
https://github.com/mongodb/mongo/commit/562bc105b058c139be44c6655cc5be5a40d8379e

Comment by Githook User [ 30/Nov/18 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-36437 Use MODE_IS for dbstats

(cherry picked from commit 091ef080cdcfcbed720a536e57f5afd9b8a54b46)
Branch: v4.0
https://github.com/mongodb/mongo/commit/a786c2c507b3f78be88e700a1040e7309a27b84d

Comment by Githook User [ 29/Nov/18 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-36437 Use MODE_IS for dbstats
Branch: master
https://github.com/mongodb/mongo/commit/091ef080cdcfcbed720a536e57f5afd9b8a54b46

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