Commits a transaction.
#include <zPublics.h> STATUS zCommitXaction( Key_t key, Xid_t xid);
(IN) Specifies the key that identifies the owner of the transactions. Although any key derived from the same root key can be used for this function, it is easier to maintain the code if you use the same key that was used in zBeginXaction.
(IN) Specifies the transaction. All operations bound to the transaction are then permanent.
zOK |
The operation completed successfully. |
non-0 |
An error occurred (see Section 4.1, Return Values for a description). |
zCommitXaction does not return until all the operations bound to the transaction have been written to permanent storage. This does not mean the data has been written to the actual final fil. However, the data has been logged, so that if the system crashes, the recovery code can finish the operations. If this is a child of a nested transaction, all its locks are passed to its parent. If this is a root transaction, all of its locks are released before the call returns and after all the other operations have been committed.