Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6789

Transaction aborted state is incorrectly included in committed states.

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • 2
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a MongoDB Node.js driver user, I want the transaction state machine in /src/transactions.ts to correctly categorize TRANSACTION_ABORTED, so that the logic aligns with expected transactional behavior.

      User Experience

      The incorrect categorization could lead to unexpected behavior when checking if a transaction is committed. This may cause misinterpretations in application logic relying on isCommitted().

      • Impact: All users relying on transaction state checks.
      • Severity: Medium, as it could lead to incorrect business logic decisions.

      Dependencies

      Check if other drivers (Python, Java, etc.) have the same issue for consistency.

      Risks/Unknowns

      • Could changing this behavior break existing applications?
      • Do any tests or internal logic depend on TRANSACTION_ABORTED being in committed states?

      Acceptance Criteria

      • TRANSACTION_ABORTED should not be included in COMMITTED_STATES in /src/transactions.ts.
      • isCommitted() should return false for aborted transactions.
      • Ensure no unintended breakages in transaction handling.

      Testing Requirements

      • Unit tests to verify state transitions.
      • Ensure isCommitted() returns expected results.

      Documentation Requirements

      • Update API documentation to clarify expected behavior if needed.

      Follow Up Requirements

      • Confirm behavior with database team.
      • Check if changes need to be reflected across other MongoDB drivers.

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            mmdalix@gmail.com MohammadAli Zeraatkar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None