[SERVER-45903] Sort with {$meta: 'randVal'} crashes mongos Created: 31/Jan/20  Updated: 29/Oct/23  Resolved: 14/Feb/20

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

Type: Bug Priority: Critical - P2
Reporter: Arun Banala Assignee: Arun Banala
Resolution: Fixed Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2020-02-24
Participants:
Linked BF Score: 23

 Description   

It looks like we have started allowing usage of {$meta: 'randVal'} in sort which was disallowed in 4.2. But this was not correctly handled on mongos, resulting in hitting this fassert.

The following query will crash mongos on master

db.c.find().sort({val: { $meta: 'randVal' } })



 Comments   
Comment by Githook User [ 14/Feb/20 ]

Author:

{'username': 'banarun', 'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com'}

Message: SERVER-45903 Allow sort with {$meta:'randVal'} on sharded clusters

create mode 100644 jstests/core/sort_with_meta_operator.js
Branch: master
https://github.com/mongodb/mongo/commit/a7a4c477283d6cdddb5d16de6b976b71a7afaffe

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