There are many ad-hoc interfaces and solutions for how to link mongod and mongos common code with mongod or mongos specific code, in order to avoid code duplication

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Service Arch
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      I think there are enough instances of this pattern to warrant work to provide a uniform means of achieving this.

      These are some existing means of linking mongos and mongod logic separately, along with common logic in mongos and mongod

      • mongod_main.cpp and mongos_main.cpp
        • Typically for code that only starts up in one or the other, not common code
      • Interface with factory construction method like query’s MongoProcessInterface.
      • ServiceContext has ConstructorActionRegisterer.
        • Keeps code separate in their own files, don’t need factory classes.

      Would be great to have a unified means of doing this. There are already a lot of separate instances.

      Some existing command interfaces:

      • DBDirectClient
      • ShardRegistry
      • ConfigShard

            Assignee:
            [DO NOT USE] Backlog - Service Architecture
            Reporter:
            Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: