-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
findAndModify slow query logs omit queryShapeHash, unlike find, count, distinct, aggregate and the other write commands (insert/update/delete).
Background
The other commands call OpDebug::ensureQueryShapeHash during query shape registration (query_cmd/*.cpp, write_cmd_shape_registration.cpp). The findAndModify path never does, so OpDebug::_queryShapeHash is never populated and the field is omitted when the slow query log is serialized.
Fix Sketch
* Compute the query shape hash for findAndModify (via ensureQueryShapeHash, mirroring the update/delete path) for both the update and remove variants.
Test Re-enable
In jstests/noPassthrough/logging/log_write_command_fields.js, flip it.skip to it for "FAM TODO SERVER-XXXXX: findAndModify logs queryShapeHash" and replace SERVER-XXXXX with this ticket number. The enabled findAndModify tests currently assert the hash's absence; flip those expectQueryShapeHash: false to true.
Acceptance Criteria
* findAndModify (update and remove) slow query logs include a well-formed 64-char hex queryShapeHash.
* The re-enabled test above passes.
- is related to
-
SERVER-122926 Add jstest coverage for write command slow query logs
-
- Closed
-
- related to
-
SERVER-135233 Complete TODO listed in SERVER-134826
-
- Needs Scheduling
-