Info
The string printed in a logline error for a RESOURCE_DDL_DATABASE lock is the collection name instead of the database name.
That's an example of a logline where a lock acquisition for a DDL Database lock failed:
[fsm_workload_test:random_DDL_setFCV_operations:CheckMetadataConsistencyInBackground] "errmsg" : "Failed to acquire DDL lock for 'random_DDL_setFCV_operations_DB_1' in mode S after 300000 ms that is currently locked by '{\"{ operation: \"{ namespace: \"random_DDL_setFCV_operations_DB_1.sharded_coll_1\", operationType: \"renameCollection_V2\" }\", lock mode: \"IX\" }\", \"{ operation: \"{ namespace: \"random_DDL_setFCV_operations_DB_1.sharded_coll_1\", operationType: \"dropCollection_V2\" }\", lock mode: \"IX\" }\", \"{ operation: \"{ namespace: \"random_DDL_setFCV_operations_DB_1.sharded_coll_0\", operationType: \"createCollection_V3\" }\", lock mode: \"IX\" }\"}'",
Top User Comments
JIRAUSER1268536 commented on Tue, 18 Jul 2023 14:27:35 +0000:
Closed as Works as Designed since this is not an issue.
The error message is showing who owns the lock at that moment, and one of the printed items is the namespace related to the operation that is holding the lock, which may cause a bit of confusion since one may think that the holden lock resource is the namespace and not the database.
We prefer to keep that info, even if it's confusing at first, since it gives us extra information about the lock holder.