Standardizing transaction abort handling by using `appendRawResponses`

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The RawResponsesResult::appendRawResponses utility function has been enhanced to include write concern errors when any shard returns an error (see SERVER-103580).

      This allows standardizing transaction abort handling by replacing custom code with this unified utility function.

      Trying to implement this simple change, I noticed that unit tests failed for two reasons:

      1. readOnly field filtering: Tests expect the readOnly field in responses, but this is intentionally excluded by filterCommandReplyForPassthrough (classified as a non-forwardable shard response field).
      2. Raw BSON member: Some tests now fail due to the presence of a raw BSON member in the new response format.

      Assigning this to the RSS team, as they own the transaction logic and can best determine the intended behavior.

              Assignee:
              Unassigned
              Reporter:
              Antonio Fuschetto
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: