[SERVER-35674] Improve error logging in abort_transaction_thread_does_not_block_on_locks.js Created: 19/Jun/18  Updated: 29/Oct/23  Resolved: 22/Jun/18

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

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2018-07-02
Participants:
Linked BF Score: 16

 Description   

In abort_transaction_thread_does_not_block_on_locks.js when a "find" does not return an ExceededTimeLimit error as expected, the test will fail. It is unclear whether the command succeeded or whether the command failed with a different error code.

I would expect something like the code below, which would immediately fail the test if any other error code caused the command to fail.

assert.soon(function() {
    // Wait for the drop to have a pending MODE_X lock on the database, which will block
    // MODE_IS lock requests behind it.
    let res = testDB.runCommand({find: collName, maxTimeMS: 100});
    if (res.code == ErrorCodes.ExceededTimeLimit) {
        return true;
    }
    assert.commandWorked(res);
    return false;
});



 Comments   
Comment by Githook User [ 22/Jun/18 ]

Author:

{'username': 'louiswilliams', 'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com'}

Message: SERVER-35674 Improve error logging in abort_transaction_thread_does_not_block_on_locks.js
Branch: master
https://github.com/mongodb/mongo/commit/aeb5b8233c01c8e510c18bd7862828d0244b8210

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