[SERVER-78274] SBE should use expanded index pattern for wildcard index Created: 21/Jun/23  Updated: 29/Oct/23  Resolved: 22/Jun/23

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

Type: Bug Priority: Major - P3
Reporter: Rui Liu Assignee: Rui Liu
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-78307 SBE scan stage may process wildcard i... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0
Participants:
Linked BF Score: 136

 Description   

Currently SBE index scan uses key patterns from the index catalog for wildcard index, which may look like "{$**: 1}". However, we should use the expanded index pattern instead generated by the query planner.

These two key patterns may differ in length which in turn fails the invariant during index key rehydration.



 Comments   
Comment by Githook User [ 23/Jun/23 ]

Author:

{'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}

Message: SERVER-78274 Fix missing test assertion

(cherry picked from commit c100d3fb3f1825cbfd34ab68577b45c29547fd10)
Branch: v7.0
https://github.com/mongodb/mongo/commit/36f61bcd0e9654c27dd29aa5947646e4083a2b96

Comment by Githook User [ 23/Jun/23 ]

Author:

{'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}

Message: SERVER-78274 Fix missing test assertion
Branch: master
https://github.com/mongodb/mongo/commit/c100d3fb3f1825cbfd34ab68577b45c29547fd10

Comment by Githook User [ 22/Jun/23 ]

Author:

{'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}

Message: SERVER-78274 Fix invariance failure caused by rehydrating unexpanded wildcard index pattern

(cherry picked from commit 5c7694b7afd519eaa01b2f14292d49e90a3a1a58)
Branch: v7.0
https://github.com/mongodb/mongo/commit/58a1441efb124ccca00022d923b15ed7736defba

Comment by Githook User [ 22/Jun/23 ]

Author:

{'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}

Message: SERVER-78274 Fix invariance failure caused by rehydrating unexpanded wildcard index pattern
Branch: master
https://github.com/mongodb/mongo/commit/5c7694b7afd519eaa01b2f14292d49e90a3a1a58

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