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

Make service_entry_point_common.cpp more modular

    • Type: Icon: Improvement Improvement
    • Resolution: Declined
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Service Arch

      As discussed with replication team and schwerin, service_entry_point_common.cpp is hard to read, reason about and maintain. One of the reasons is that it hosts too many details in various sub-systems: command parsing, command execution, read concern, write concern, transaction, session checkout, error handling, etc. The ordering and dependencies of these sub-systems is unclear and error prone.

      SERVER-37179 is an example. It needs to catch the error NoSuchTransaction and wait for write concern. However, starting transaction can throw this error as a part of session checkout, which happens very early in execCommandDatabase, way before where we parse and wait for write concern. As a result, SERVER-37179 has to untangle the hidden dependencies. This is an unfortunate tech debt as the transaction mechanism evolves.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: