Skip to main content
MongoDB

MongoDB - Commit transaction

MongoDB - Commit transaction

Applies every operation performed inside a MongoDB transaction session started with MongoDB: Start transaction. After the commit, every change is permanently confirmed in the database.


Options

Transaction

Reference to the MongoDB: Start transaction action whose session will be committed.

Returns

Javascript code

js
actions["action-id"].session // session of the committed transaction (Any)

Field selection

  • session — transaction session that was committed (Any)

Rules and Conditions

  • The Transaction field is required and must reference a MongoDB: Start transaction action.
  • After the commit, the operations performed inside the transaction are applied permanently.
  • If a failure happens before the commit, use MongoDB: Abort transaction to undo the operations.