-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
QO 2022-07-11, QO 2022-07-25, QO 2022-08-08
This bug is related to CQF/bonsai only.
coll.insertOne({a: 1}); coll.createIndex({a: -1}); const res = coll.find({a : {$gte: 0, $lte: 2}}).toArray();
The query above should always return the one document but instead sometimes returns nothing, dependent on which plan is chosen and if the index is used. Note that if
for (i = 0; i < 100; ++i) coll.insert({})
is added, a plan using the descending index will always be chosen, and the query will return no results.