-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
ALL
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The cluster findAndModify TypedCommand conversion (SERVER-119290) caused a test failure in currentop_query.js (BF-42725).
The currentop_query.js test uses db.currentop_query.findAndModify() (the legacy shell helper), which sends "findandmodify" (lowercase) on the wire. The test then filters currentOp output for "command.findandmodify": {$exists: true}.
After SERVER-119290, mongos re-serializes the command via FindAndModifyCommandRequest::toBSON() before forwarding to a shard. toBSON() uses the IDL canonical name "findAndModify" (camelCase), so the shard's currentOp now reports "findAndModify" instead of "findandmodify".
The fix is to replace the db.currentop_query.findAndModify() shell helper call with a runCommand({findAndModify: ...}) which sends "findAndModify" (camelCase) on the wire. This makes the command name consistent across all currentOp paths (direct to mongod, localOps on mongos, and remote shard). All official MongoDB drivers (including mongosh) already use the camelCase form; the only exception is the mongo shell which uses the lowercase alias so this also brings it more inline with the current standard.
- is related to
-
SERVER-119290 Convert clusterFindAndModify to TypedCommand
-
- Closed
-