[SERVER-83490] Don't execute $addFields in SBE when it is part of $setWindowFields Created: 21/Nov/23  Updated: 29/Nov/23  Resolved: 27/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0, 7.2.0-rc2

Type: Bug Priority: Major - P3
Reporter: Foteini Alvanaki Assignee: Foteini Alvanaki
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-83561 Push addFields created as part of set... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.2
Sprint: QE 2023-11-27, QE 2023-12-11
Participants:
Linked BF Score: 120

 Description   

Executing in SBE $addFields that is part of a $setWindowFields gives a regression in the default variant that executes $setWindowsField in classic. To mitigate this issue we will not push in SBE `$addFields` that is part of `$setWindowFields` until `$setWindowFields` has been pushed in SBE and the performance regression has been fixed.

 



 Comments   
Comment by Githook User [ 24/Nov/23 ]

Author:

{'name': 'Foteini Alvanaki', 'email': 'foteini.alvanaki@mongodb.com', 'username': ''}

Message: SERVER-83490 Do not push to SBE $addFields stage created as part of $setWindowFields
Branch: v7.2
https://github.com/mongodb/mongo/commit/ae77de622a5063fe4af72f08ea23a9f6b1ca5fda

Comment by Githook User [ 24/Nov/23 ]

Author:

{'name': 'Foteini Alvanaki', 'email': 'foteini.alvanaki@mongodb.com', 'username': ''}

Message: SERVER-83490 Do not push to SBE $addFields stage created as part of $setWindowFields
Branch: master
https://github.com/mongodb/mongo/commit/e87ed2a25d65ec0a2580ce9925fc0c1d42fb94a1

Comment by Githook User [ 24/Nov/23 ]

Author:

{'name': 'Foteini Alvanaki', 'email': 'foteini.alvanaki@mongodb.com', 'username': ''}

Message: Revert "SERVER-83490 Do not push to SBE $addFields stage created as part of $setWindowFields"

This reverts commit b39883a2c9fc05cad5e8993f8c0dd712b91d270a.
Branch: master
https://github.com/mongodb/mongo/commit/e9fca439636adc345719351f1862cb8693daae6c

Comment by Githook User [ 24/Nov/23 ]

Author:

{'name': 'Foteini Alvanaki', 'email': 'foteini.alvanaki@mongodb.com', 'username': ''}

Message: Revert "SERVER-83490 Do not push to SBE $addFields stage created as part of $setWindowFields"

This reverts commit 99353dfe36d1504d6fd123f279161fd21b332890.
Branch: v7.2
https://github.com/mongodb/mongo/commit/3fcf93122119ca032d85551d6b2fe8a57388c03c

Comment by Foteini Alvanaki [ 23/Nov/23 ]

The change did not consider the feature flag and disables pushing to SBE $addField that has been created during desugaring $setWindowFields even when sbeFull flag has been set. I am reverting the change since this essentially disables pushing setWindowFields almost completely.

 

master revert patch 

v7.2 revert patch

Comment by Githook User [ 23/Nov/23 ]

Author:

{'name': 'Foteini Alvanaki', 'email': 'foteini.alvanaki@mongodb.com', 'username': ''}

Message: SERVER-83490 Do not push to SBE $addFields stage created as part of $setWindowFields
Branch: v7.2
https://github.com/mongodb/mongo/commit/99353dfe36d1504d6fd123f279161fd21b332890

Comment by Githook User [ 23/Nov/23 ]

Author:

{'name': 'Foteini Alvanaki', 'email': 'foteini.alvanaki@mongodb.com', 'username': ''}

Message: SERVER-83490 Do not push to SBE $addFields stage created as part of $setWindowFields
Branch: master
https://github.com/mongodb/mongo/commit/b39883a2c9fc05cad5e8993f8c0dd712b91d270a

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