Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57405

add queryHash and planCacheKey to mongod and mongos slow query logs for update and delete request

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Integration

      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

            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            mickey.winters@mongodb.com Mickey Winters
            0 Vote for this issue
            5 Start watching this issue