Details
-
Improvement
-
Resolution: Declined
-
Major - P3
-
None
-
None
-
None
-
Service Arch
Description
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.