(mongodb >=1.5.0)
MongoDB\Driver\Session::commitTransaction — Commits a transaction
Saves the changes made by the operations in the multi-document transaction and ends the transaction. Until the commit, none of the data changes made from within the transaction are visible outside the transaction.
此函数没有参数。
没有返回值。
"errorLabels"
element, and this array contains a
"TransientTransactionError"
or
"UnknownTransactionCommitResult"
value, it is safe to re-try
the whole transaction. In newer versions of the
extension,
MongoDB\Driver\Exception\RuntimeException::hasErrorLabel()
should be used to test for this situation instead.