[SERVER-79011] The database DDL resource name is not correctly printed Created: 17/Jul/23  Updated: 27/Oct/23  Resolved: 18/Jul/23

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

Type: Bug Priority: Major - P3
Reporter: Silvia Surroca Assignee: Silvia Surroca
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Sharding EMEA 2023-07-24
Participants:

 Description   

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\" }\"}'", 

 



 Comments   
Comment by Silvia Surroca [ 18/Jul/23 ]

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.

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