[SERVER-48495] OpDebug::report() incorrectly reports "errName" attribute as number and not ErrorCodes::errorString() Created: 29/May/20  Updated: 29/Oct/23  Resolved: 03/Jun/20

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

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Gabriel Russell (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service arch 2020-06-15
Participants:

 Description   

https://github.com/mongodb/mongo/blob/3f13c7c6d1196192cbd23db84ef88eb8cb63aa5c/src/mongo/db/curop.cpp#L971

4.2.6 behavior

2020-05-29T12:56:28.918-0400 I  COMMAND  [conn1] command test.mycoll appName: "MongoDB Shell" command: find { find: "mycoll", filter: { $where: "sleep(100)" }, maxTimeMS: 1.0, lsid: { id: UUID("802f1d9e-b425-4c4d-9c0d-a5e4ed1c9494") }, $db: "test" } numYields:0 ok:0 errMsg:"operation exceeded time limit" errName:MaxTimeMSExpired errCode:50 reslen:121 locks:{ ReplicationStateTransition: { acquireCount: { w: 2 } }, Global: { acquireCount: { r: 1 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { r: 1 } }, Mutex: { acquireCount: { r: 1 } } } protocol:op_msg 23ms

master@3f13c7c behavior

{"t":{"$date":"2020-05-29T12:59:37.419-04:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"test.mycoll","appName":"MongoDB Shell","command":{"find":"mycoll","filter":{"$where":"sleep(100)"},"maxTimeMS":1.0,"lsid":{"id":{"$uuid":"cf6e4a65-c87b-48b4-8c02-b70eafd97c4e"}},"$db":"test"},"numYields":0,"ok":0,"errMsg":"operation exceeded time limit","errName":50,"errCode":50,"reslen":121,"locks":{"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":1}},"Database":{"acquireCount":{"r":1}},"Collection":{"acquireCount":{"r":1}},"Mutex":{"acquireCount":{"r":1}}},"protocol":"op_msg","durationMillis":48}}



 Comments   
Comment by Githook User [ 03/Jun/20 ]

Author:

{'name': 'Gabriel Russell', 'email': 'gabriel.russell@mongodb.com', 'username': 'gabrielrussell'}

Message: SERVER-48495 fix up the errName filed of the slow query log
Branch: v4.4
https://github.com/mongodb/mongo/commit/9f86bbafc8bc0089afae84795757b94cab77f9ce

Comment by Githook User [ 02/Jun/20 ]

Author:

{'name': 'Gabriel Russell', 'email': 'gabriel.russell@mongodb.com', 'username': 'gabrielrussell'}

Message: SERVER-48495 fix up the errName filed of the slow query log
Branch: master
https://github.com/mongodb/mongo/commit/80f81b001abbc7aa585b26ef1461225ecad90b51

Generated at Thu Feb 08 05:17:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.