[SERVER-35290] dropDatabase does not respect maxTimeMS Created: 30/May/18  Updated: 29/Oct/23  Resolved: 12/Dec/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 4.0.0-rc1
Fix Version/s: 4.1.7

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: prepare_interruptibility, uninterruptibleLockGuardRemoval
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

(function() {
    const rst = ReplSetTest({nodes: 1});
    rst.startSet();
    rst.initiate();    
 
    const testDB = rst.getPrimary().getDB("test");
    const session = testDB.getMongo().startSession({causalConsistency: false});
    const sessionDB = session.getDatabase("test");
    assert.commandWorked(sessionDB.c.insert({}));    
 
    session.startTransaction();
    assert.commandWorked(sessionDB.c.insert({}));    
 
    // Runs forever.
    assert.commandFailedWithCode(testDB.runCommand({dropDatabase: 1, maxTimeMS: 100}), ErrorCodes.ExceededTimeLimit);    
 
    session.commitTransaction();
    session.endSession();
    rst.stopSet();
}()); 

Sprint: Storage NYC 2018-12-17
Participants:

 Description   

If dropDatabase is blocked from acquiring a GlobalWrite lock, it will wait forever, even if maxTimeMS is set.



 Comments   
Comment by Githook User [ 12/Dec/18 ]

Author:

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

Message: SERVER-35290 dropDatabase command should respect maxTimeMS
Branch: master
https://github.com/mongodb/mongo/commit/4a47c79bcba9fe926b2525a92abd34dbc583e2c7

Comment by Tess Avitabile (Inactive) [ 05/Jun/18 ]

Please update this TODO as part of this work.

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