[SERVER-51718] Disallow sparse, hashed indexes from being considered for answering $exists: false queries. Created: 16/Oct/20  Updated: 29/Oct/23  Resolved: 04/Nov/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0, 4.4.3

Type: Bug Priority: Critical - P2
Reporter: Sam Mercier Assignee: James Wahlin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-52618 Sparse hash index should not be used ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Query 2020-10-19, Query 2020-11-02, Query 2020-11-16
Participants:
Linked BF Score: 9

 Description   

The index selector currently believes that hashed, sparse indexes can be used to answer {$exists:false} queries. However, sparse indexes cannot be used to answer such queries so this triggers a failure.

A resolution to this ticket would include:
1) server changes that disallow sparse hashed indices from being considered to answer such a query
2) unit tests and javascript tests ensuring that hashed sparse indexes won't be considered to answer {$exists: false} queries



 Comments   
Comment by Githook User [ 23/Nov/20 ]

Author:

{'name': 'James Wahlin', 'email': 'james@mongodb.com', 'username': 'jameswahlin'}

Message: SERVER-51718 Disallow sparse, hashed indexes from being considered for answering $exists: false queries

(cherry picked from commit daa74ba2f414534e736f408b40d62aef869b06cc)
Branch: v4.4
https://github.com/mongodb/mongo/commit/b9d2f2d444ca99e1af4a5f239656f6bac83a5b73

Comment by Githook User [ 04/Nov/20 ]

Author:

{'name': 'James Wahlin', 'email': 'james@mongodb.com', 'username': 'jameswahlin'}

Message: SERVER-51718 Disallow sparse, hashed indexes from being considered for answering $exists: false queries
Branch: master
https://github.com/mongodb/mongo/commit/daa74ba2f414534e736f408b40d62aef869b06cc

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