[DOCS-14762] Investigate changes in SERVER-53859: Add queryHash to the mongos slow query logs Created: 25/Aug/21  Updated: 13/Nov/23  Resolved: 02/Sep/21

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 5.1.0-rc0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Jeffrey Allen
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-53859 Add queryHash to the mongos slow quer... Closed
Participants:
Days since reply: 2 years, 22 weeks, 6 days ago
Epic Link: DOCSP-14300

 Description   
Downstream Change Summary

This change adds a "queryHash" to the slow log lines to help users diagnose slow queries. It may potentially affect scripts which parse the slow query log line.

Description of Linked Ticket

`queryHash` field introduced in slow query logs in v4.2 is available only in `mongod` logs and not in `mongos` logs. The documentation does not have any mention of relevant behaviour. Is this expected or requires any configuration change? 

Sample mongos slow query log:

{"t":{"$date":"2020-12-31T02:19:33.680+00:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn128","msg":"Slow query","attr":{"type":"command","ns":"xxxx.companyPriority","command":{"find":"companyPriority","filter":{"_id":{"$in":[{"$oid":"5319df10e4b0f7e16602a313"}]}},"$db":"xxxx","$clusterTime":{"clusterTime":{"$timestamp":{"t":1609381171,"i":2}},"signature":{"hash":{"$binary":{"base64":"C2cNRe4vAhiBs97T6VYXIYYU1Ck=","subType":"0"}},"keyId":6877905033757720578}},"lsid":{"id":{"$uuid":"ba72a15f-2568-43e9-8c9a-abd7bd2aa6be"}}},"nShards":1,"cursorExhausted":true,"numYields":0,"nreturned":1,"reslen":278,"protocol":"op_msg","durationMillis":2007}}



 Comments   
Comment by Jeffrey Allen [ 02/Sep/21 ]

When we added this feature to the 4.2 docs, we did not distinguish between mongod / mongos. Therefore as far as the docs are concerned, it's been since 4.2 documented that this was true for mongos.

https://docs.mongodb.com/manual/reference/log-messages/#logging-slow-operations

Comment by PM Bot [ 25/Aug/21 ]

Downstream changes updated for upstream SERVER-53859:
This change adds a "queryHash" to the slow log lines to help users diagnose slow queries. It may potentially affect scripts which parse the slow query log line.

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