[SERVER-57405] add queryHash and planCacheKey to mongod and mongos slow query logs for update and delete request Created: 03/Jun/21  Updated: 27/Oct/23  Resolved: 05/May/23

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

Type: Improvement Priority: Minor - P4
Reporter: Mickey Winters Assignee: Backlog - Query Integration
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-57404 add queryHash to mongos slow query lo... Backlog
is depended on by SERVER-57406 add queryHash and planCacheKey to mon... Backlog
Related
related to SERVER-53859 Add queryHash to the mongos slow quer... Closed
Assigned Teams:
Query Integration
Participants:

 Description   

currently mongod will the query hash for slow find queries, but when slow logging update/delete queries it doesn't log the queryHash that could be calculated from the filter

there are several ways to go about generating the query hash for an update request. query hashing currently expects a cannonical query, but there is no canonicalize(updateRequest) function. additionally in mongos there isn't currently a place where the query is canonicalized  to pipe through.

potential solutions:

  • make a find command request and then set the filter to the filter of the updateCommand request
    • this is already done in src/mongo/db/ops/parsed_update.cpp and src/mongo/db/update/update_driver.cpp
  • create a canonicalize(updateRequest)
  • find somewhere where the update request is already canonicalized and use that instance.
    • there isn't really a place where this is done currently in mongos
  • manually construct the query hash


 Comments   
Comment by Arun Banala [ 05/May/23 ]

Closing this in favor of SERVER-57406 and SERVER-57404

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