Loading TOC...


   host-id as (Number|String),
   txn-id as (Number|String)
) as null


Explicitly commit a transaction running on a named host.

host-id A host id.
txn-id The transaction ID.

Required Privileges



Usage Notes

Use this function to explicitly commit a remote transaction running in "update" or "query" transaction mode. You typically will not use this function for transactions running in "auto" transaction mode because the server commits such transactions automatically, at the end of every statement.

When you call xdmp:transaction-commit, the transaction is marked for commit. The commit occurs asyncronously at a point in time after the end of the current executing statement, typically after the next cluster heartbeat. The transaction ends at that point, and you can verify it with xdmp:host-status.

If the named host or transaction does not exist, an error is raised.

See Also


xdmp.transactionCommit(xdmp.host("some-host.yourdomain.com"), some-txn-id);

=> Empty. The given transaction is marked ready to be committed.

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.