Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-94219

Mongo shell and mongos link in too many mongod-specific components via query_exec

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL

      The mongo shell and mongos transitively link many unneeded libraries, like libjournal_flusher, which clearly does not belong in either.

      This makes startup times for the shell and mongos slower for dynamic compiles and makes static compiles take longer.

      As an example, the journal flusher, which is a mongod-specific component, is transitively included in this path on the shell:

      • mongo_initializers ->
      • implicit_encrypted_dbclient ->
      • query_analysis ->
      • query_exec ->
      • repl/wait_for_majority_service ->
      • db/rw_concern_d ->
      • storage/storage_control ->
      • journal_flusher

      The query_exec library is the main contributor to the problem. It consists of over 100 source files and a slightly smaller number of library dependencies.

      I recommend we create a lightweight query library that doesn't link in "repl/wait_for_majority_service" or any other mongod-specific libraries or source files. We can then use that for the shell and mongos.

            Assignee:
            Unassigned Unassigned
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: