[SERVER-72198] Separate query_exec executable in scons Created: 16/Dec/22  Updated: 18/Jan/23  Resolved: 18/Jan/23

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

Type: Task Priority: Major - P3
Reporter: Sanika Phanse (Inactive) Assignee: Arun Banala
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-69918 Produce upsert document in _clusterQu... Closed
Assigned Teams:
Query Execution
Sprint: QE 2023-01-23
Participants:

 Description   

We need to bring upsert_stage.cpp & update_stage.cpp into mongos for PM-1632. Right now, those files are built as a part of the query_exec library; however, this is a large executable to add to the mongos binary.

On slack, it was mentioned that a concern of including query_exec as is directly in mongos' binary is that it includes a lot of SBE code which is not relevant on mongos.

Two solutions come to mind, either separating update_stage.cpp, upsert_stage.cpp, and all its dependancies into it's own library or separate all SBE code into a separate library, but any approach to reduce the size of the binary imported into mongos would be helpful.



 Comments   
Comment by Arun Banala [ 18/Jan/23 ]

I'm closing this as Won't Do, as we no longer need this. SERVER-72806 found a way to circumvent this dependency problem.

Comment by Sanika Phanse (Inactive) [ 20/Dec/22 ]

This is an in-progress split that can be used as a starting point (it does not compile).

env.Library(
    target='update_stage',
    source=[
        'exec/plan_cache_util.cpp',
        'exec/plan_stage.cpp',
        'exec/requires_collection_stage.cpp',
        'exec/shard_filter.cpp',
        'exec/update_stage.cpp',
        'exec/upsert_stage.cpp',
        'exec/write_stage_common.cpp',
        'exec/working_set_common.cpp',
        'ops/update_result.cpp',
        'query/plan_explainer_factory.cpp',
        'query/plan_explainer_impl.cpp',
        'query/plan_executor.cpp',
    ],
    LIBDEPS=[
        'catalog/collection',
        'catalog/collection_query_info',
        'query/plan_yield_policy',
        'update/update_driver',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/catalog/collection_catalog',
        '$BUILD_DIR/mongo/db/catalog/collection_crud',
        '$BUILD_DIR/mongo/db/catalog/document_validation',
        '$BUILD_DIR/mongo/db/catalog/local_oplog_info',
        '$BUILD_DIR/mongo/db/concurrency/exception_util',
        '$BUILD_DIR/mongo/db/internal_transactions_feature_flag',
        '$BUILD_DIR/mongo/db/s/sharding_api_d',
        'shard_filterer',
    ]
)

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