[SERVER-83969] $geoNear expression fails to re-parse Created: 07/Dec/23  Updated: 11/Dec/23  Resolved: 11/Dec/23

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

Type: Bug Priority: Major - P3
Reporter: Alyssa Clark Assignee: Alyssa Clark
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-85096 TRACKING: M3 Correctness Tickets Closed
is depended on by SERVER-83946 Enable query stats for the mutational... Closed
Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

This geoNear syntax fails to re-parse:

db.c.find({loc: {$geoNear: [0, 0]}} 

{"t":{"$date":"2023-12-07T15:53:53.103+00:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn1","msg":"Slow query","attr":{"type":"command","isFromUserConnection":true,"ns":"admin.$cmd.aggregate","collectionType":"admin","appName":"MongoDB Shell","command":{"aggregate":1,"cursor":{},"pipeline":[{"$queryStats":{}},{"$project":{"key":1}}],"lsid":{"id":{"$uuid":"68221861-db84-4b10-84ff-9cb688ada8a5"}},"$db":"admin"},"numYields":0,"queryFramework":"classic","ok":0,"errMsg":"PlanExecutor error during aggregation :: caused by :: Was not able to re-parse queryStats key when reading queryStats.Status BadValue: Could not re-parse a representative query shape :: caused by :: invalid argument in geo near query: 0 Hash: 15482305599978419614 Query Shape: { cmdNs: { db: \"test\", coll: \"t\" }, command: \"find\", filter: { loc: { $geoNear: [ 1 ] } } }","errName":"Location7349401","errCode":7349401,"reslen":459,"locks":{},"cpuNanos":159458281,"remote":"127.0.0.1:54052","protocol":"op_msg","durationMillis":159}} 



 Comments   
Comment by Githook User [ 11/Dec/23 ]

Author:

{'name': 'Alyssa Clark', 'email': 'alyssa.clark@mongodb.com', 'username': 'awagenmaker'}

Message: SERVER-83969 Use valid representative value for legacy geoNear expression

GitOrigin-RevId: 7a8ac8743be45d172cdbd6a489edf6173468b75b
Branch: master
https://github.com/mongodb/mongo/commit/35b0a192dbdc6cce15825d02a0bd5c378088b090

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