[SERVER-62507] Investigate “TODO” comment in PathLowering::optimize() Created: 11/Jan/22  Updated: 29/Oct/23  Resolved: 27/Jan/23

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

Type: Task Priority: Major - P3
Reporter: Drew Paroski Assignee: Ted Tuckman
Resolution: Fixed Votes: 0
Labels: auto-reverted
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Related
is related to SERVER-73365 Add interface to EvalFilterLowering a... Closed
Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-02-06
Participants:
Linked BF Score: 162

 Description   

There is a “TODO” comment in PathLowering::optimize() that says "Investigate why we crash when this is removed. It should not be needed here."
Comment is here
I tried commenting-out the 3 lines of code that the "TODO" comment refers to, and doing so caused a bunch tests to fail in the "jstests/aggregation/abt" folder:

jstests/aggregation/abt/basic_agg.js
jstests/aggregation/abt/basic_unwind.js
jstests/aggregation/abt/chess.js
jstests/aggregation/abt/filter_order.js
jstests/aggregation/abt/find_sort.js
jstests/aggregation/abt/group.js
jstests/aggregation/abt/index_intersect1.js
jstests/aggregation/abt/nonselective_index.js
jstests/aggregation/abt/object_elemMatch.js
jstests/aggregation/abt/partial_index.js
jstests/aggregation/abt/sampling.js
jstests/aggregation/abt/selective_index.js
jstests/aggregation/abt/sort.js
jstests/aggregation/abt/sort_project.js
jstests/aggregation/abt/type_bracket.js
jstests/aggregation/abt/type_predicate.js
jstests/aggregation/abt/unionWith.js
jstests/aggregation/abt/value_elemMatch.js

The goal of this task is to determine who the author of this "TODO" comment is, follow up with them to get context, and then investigate and understand why removing the code referred to by the "TODO" comment causes these tests to fail.

From there, next steps will be determined to see if the "TODO" comment should be removed and to see if any code changes are needed.



 Comments   
Comment by Githook User [ 27/Jan/23 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-62507 Update comments about rebuilding during PathLowering
Branch: master
https://github.com/mongodb/mongo/commit/73c7118344276f8fbfc391ed6971c28f601e3697

Comment by xgen-buildbaron-user [ 26/Jan/23 ]

Ticket re-opened due to revert. aggregation_column_store_index_passthrough began a consistent failure of jstests/aggregation/sources/project/remove_redundant_projects.js

Comment by Githook User [ 26/Jan/23 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com', 'username': ''}

Message: Revert "SERVER-62507 Remove extra rebuild during path lowering"

This reverts commit 30d4f8bf574ebf22d3e61719c3335e075d16593c.
Branch: master
https://github.com/mongodb/mongo/commit/63970dc922c2b307c59a9543613f41714fb1b6d6

Comment by Githook User [ 25/Jan/23 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-62507 Remove extra rebuild during path lowering
Branch: master
https://github.com/mongodb/mongo/commit/30d4f8bf574ebf22d3e61719c3335e075d16593c

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