xdmp:transaction-commit( $host-id as xs:unsignedLong, $txn-id as xs:unsignedLong ) as empty-sequence()
Explicitly commit a transaction running on a named host.
Parameters | |
---|---|
host-id | A host id. |
txn-id | The transaction ID. |
http://marklogic.com/xdmp/privileges/complete-my-transactions
http://marklogic.com/xdmp/privileges/complete-any-transactions
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.
xdmp:transaction-commit(xdmp:host("some-host.yourdomain.com"), $some-txn-id) => Empty. The given transaction is marked ready to be committed.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.