[SERVER-82829] [CQF] Update fallback mechanism to allow sharded aggregations to use CQF Created: 06/Nov/23 Updated: 09/Nov/23 Resolved: 09/Nov/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Hana Pearlman | Assignee: | Hana Pearlman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | QO 2023-11-13 |
| Participants: |
| Description |
|
Aggregation commands sent from mongos to shards have let and collation parameters added to them. This causes those queries to fall back to classic, arguably unexpectedly when the original command does not have those fields set. Interestingly, the equivalent find commands do not have those parameters. We should update the fallback mechanism to allow queries with simple collations and unused let variables to go through CQF. This will allow sharded aggregations to use CQF. |
| Comments |
| Comment by Githook User [ 09/Nov/23 ] |
|
Author: {'name': 'Hana Pearlman', 'email': 'hana.pearlman@mongodb.com', 'username': 'HanaPearlman'}Message: |
| Comment by Hana Pearlman [ 08/Nov/23 ] |
|
Alrighty, I'm re-purposing this ticket to make those changes. Thanks for the input! |
| Comment by David Storch [ 08/Nov/23 ] |
Agreed, it should just work.
Seems reasonable! |
| Comment by Hana Pearlman [ 08/Nov/23 ] |
|
Agreed, changing how CQF handles these params sounds simplest. I'm not sure what work is required to "support" the simple collation other than allowing it in the fallback mechanism. For let variables, we could ignore the command parameter in the fallback mechanism, and only fall back if we find a variable reference in the query. Or if totally ignoring the parameter seems too extreme, we could special-case NOW and CLUSTER_TIME. |
| Comment by David Storch [ 08/Nov/23 ] |
|
Sounds like we should just make CQF support collation:{locale:"simple"} if it doesn't already. We may need a separate solution for "$$NOW" and friends. |