Prepares the system to commit a transaction.
#include <zPublics.h> STATUS zPrepareToCommitXaction( Key_t key, Xid_t xid);
(IN) Specifies the owner of the transaction being prepared for commit. Alhough any key derived from the same root key can be used for this operation, it is easier to maintain the code if you use the same key that was used in zBeginXaction.
(IN) Specifies the transaction to prepare so that it can be committed or aborted if requested.
zOK |
The operation completed successfully. |
non-0 |
An error occurred (see Section 4.1, Return Values for a description). |
zPrepareToCommitXaction is similar to zCommitXaction, except it can still be aborted and is needed only to coordinate multiple transactions. In the simplest case, a transaction coordinator tells all the transactions it is coordinating to prepare. After every transaction has responded, they can all be committed.