[SERVER-79089] [CQF] Fix an invariant in CE helper heuristicIntervalSel Created: 18/Jul/23  Updated: 29/Oct/23  Resolved: 31/Jul/23

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

Type: Task Priority: Major - P3
Reporter: David Percy Assignee: David Percy
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-07-24, QO 2023-08-07
Participants:

 Description   

While adding some fuzz testing for Bonsai I ran into an invariant failure in 'heuristicIntervalSel'. We're passing in a comparison operator that it's not expecting to handle.

An example query that triggers it is:

db.c.find({array: {$elemMatch: {$eq: 114, $ne: 115}}})



 Comments   
Comment by Githook User [ 01/Aug/23 ]

Author:

{'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}

Message: SERVER-79089 Avoid passing bad input to heuristicIntervalSel helper

This helper is only intended to handle certain interval-like comparisons
such as Eq, Lt. The caller needs to avoid passing Neq, EqMember.
Branch: minh.luu-no_compile_sys-perf
https://github.com/mongodb/mongo/commit/bce2f25a861fbc8779e669a9e9c7a5c26c8c2f9c

Comment by Githook User [ 31/Jul/23 ]

Author:

{'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}

Message: SERVER-79089 Avoid passing bad input to heuristicIntervalSel helper

This helper is only intended to handle certain interval-like comparisons
such as Eq, Lt. The caller needs to avoid passing Neq, EqMember.
Branch: master
https://github.com/mongodb/mongo/commit/bce2f25a861fbc8779e669a9e9c7a5c26c8c2f9c

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