-
Type:
Bug
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: 6.0.4
-
Component/s: None
-
None
-
Query Execution
-
ALL
-
-
QE 2023-05-15, QE 2023-05-29
-
9
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
In mongod versions <= 6.0 UpdateDriver::modsAffectIndices can produce false-negative result.
It is fixed in 6.3.0-rc0 with SERVER-65364, but this change is too massive to safely backport it as is even to 6.0.
In this ticket we need to implement a custom small fix to 6.0 and try to backport it as far as possible.
How to reproduce:
- Create wildcard index
{"b.d.$**": 1}
- Add document
{a: 1}
- Update document with
{$set: {"b.c": 1}}
- Call validate({full: true}) on the collection.
Validation will show that there is missing index key "b" for the updated document. It is also possible for extra index keys to be present due to this issue.
Fortunately this redundant key will never be used because the path 'b' is not covered by the wildcard path, b.d.$** and the index bounds generated for wildcard indexes will always match the path.