TMF Introduction (G06.26+)
Transaction Coordination
HP NonStop TMF Introduction—522414-002
2-12
Summary of Transaction Coordination
A two-phase commit is analogous to the message interaction in the following example:
•
A manager wants a staff meeting and asks the administrative assistant to arrange
one when everyone can attend. The administrative assistant determines that
Thursday at 10:00 looks possible but must call to confirm with all attendees:
°
Phase 1—The administrative assistant calls you. After checking your calendar,
you reply that you can attend. At that time, you have committed to attend the
meeting, but you do not know for sure if it will really happen. You certainly
should not, however, make any other plans for the time.
°
Phase 2—Later, the administrative assistant calls backs and says that the time
is firm. You finally know that the meeting is really going to be held.
When a commit-work request is executed in an application protected by TMF, TMF
commits the transaction’s changes in two phases to ensure that the changes are
permanent and recoverable in the event of a total system failure. If the transaction is
distributed, TMF ensures that all changes can be committed at all systems involved in
the transaction. If any part of the transaction cannot be committed, the entire
transaction is backed out.
Summary of Transaction Coordination
The three stages in the life of a successful transaction are shown in Figure 2-7:
Figure 2-7. Stages of a Transaction
Stage 1
Stage 2
Stage 3
BEGIN-TRANSACTION
Modify Database
END-TRANSACTION
• Starts transaction
• Establishes transid
• Verifies and holds locks
• Builds audit records
• Verifies transaction is complete
• Releases locks
Application TMF File System
Audit
Trail
Database
VST012.vsd