-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: 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.
- is related to
-
NODE-6866 Provide an API to inspect transaction state
-
- Backlog
-