[SERVER-68512] [CQF] Fall back to classic if any index has non-simple collation Created: 02/Aug/22 Updated: 29/Oct/23 Resolved: 25/Aug/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | Nicholas Zolnierz |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | QO 2022-08-08, QO 2022-08-22, QO 2022-09-05 |
| Participants: |
| Description |
|
If any index has a non-simple collation, we should fall back to classic, the same way we do for other unsupported index types (partial, sparse, hashed, etc). Currently we check if the query request has a collation: https://github.com/10gen/mongo/blob/268a45d9962d25a7b9b5b6d995983b575451b31c/src/mongo/db/commands/cqf/cqf_command_utils.cpp#L598 But we don't check for a collation defined on the indexes: https://github.com/10gen/mongo/blob/268a45d9962d25a7b9b5b6d995983b575451b31c/src/mongo/db/commands/cqf/cqf_command_utils.cpp#L611-L614 |
| Comments |
| Comment by David Percy [ 02/Aug/22 ] |
|
We should also ignore these unsupported indexes in buildIndexSpecsOptimizer, so that we return correct results even when internalQueryForceCommonQueryFramework is enabled. |