11.24.3 Heuristic Decision Errors
The tpcommit() function may return TPEHAZARD or TPEHEURISTIC, depending on how TP_COMMIT_CONTROL is set.
If you set TP_COMMIT_CONTROL to
TP_CMT_LOGGED, the application obtains control before
the second phase of a two-phase commit is performed. In this case,
the application may not be aware of a heuristic decision that
occurs during the second phase.
TPEHAZARD or TPEHEURISTIC can be
returned in a one-phase commit, however, if a single resource
manager is involved in the transaction and it returns a heuristic
decision or a hazard indication during a one-phase commit.
If you set TP_COMMIT_CONTROL to
TP_CMT_COMPLETE, then the system returns
TPEHEURISTIC if any resource manager reports a
heuristic decision, and TPEHAZARD if any resource
manager reports a hazard. TPEHAZARD specifies that a
participant failed during the second phase of commit (or during a
one-phase commit) and that it is not known whether a transaction
completed successfully.
Parent topic: Transaction Errors