[SERVER-64359] Server-side rewrite for aggregate command on mongos Created: 09/Mar/22  Updated: 29/Oct/23  Resolved: 29/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Davis Haupt (Inactive) 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 2022-03-21, QO 2022-04-04
Participants:

 Description   

From the design:

Aggregate commands are parsed into a LiteParsedPipeline and then are only parsed into a full pipeline if the pipeline is not passed through to the primary shard, which only happens in certain conditions. We can add another condition so that aggregate commands won't be passed through to the primary shard if there may be FLE2 rewrites that need to be done, so that $match rewrites will happen on mongos before the pipeline is sent along to the relevant shards by the AggregationTargeter.

Stage rewrites

We can add a transformation pass right after the pipeline is parsed that is only run if there may be FLE2 rewrites to be done that will iterate through the stages in the pipeline and call rewriteQueryOnEncryptedFields() with the MatchExpression held by the relevant stage.



 Comments   
Comment by Githook User [ 28/Mar/22 ]

Author:

{'name': 'Hana Pearlman', 'email': 'hana.pearlman@mongodb.com', 'username': 'HanaPearlman'}

Message: SERVER-64359: Implement FLE server-side rewrite for agg command on mongos
Branch: master
https://github.com/mongodb/mongo/commit/6eb0a1b696278d4473365a169ae08f51c8a12388

Comment by Githook User [ 28/Mar/22 ]

Author:

{'name': 'Hana Pearlman', 'email': 'hana.pearlman@mongodb.com', 'username': 'HanaPearlman'}

Message: SERVER-64359: Implement FLE server-side rewrite for agg command on mongos
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/eba86d95a34dd2b462dbd26ec52f2d8f1d06263b

Comment by Nicholas Zolnierz [ 14/Mar/22 ]

hana.pearlman We can keep SERVER-63312 but should prioritize this ticket as end-to-end testing will be available on mongos before a replica set.

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