Make service_entry_point_common.cpp more modular

XMLWordPrintableJSON

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

      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:
            [DO NOT USE] Backlog - Service Architecture
            Reporter:
            Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: