z/OS MVS Programming: Resource Recovery
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Heuristic decisions

z/OS MVS Programming: Resource Recovery
SA23-1395-00

Whether a syncpoint is local or distributed, following the two-phase commit protocol means that a decision to commit or back out a set of resource changes is, on one level, a holistic decision. That is, the decision to commit or back out is made by the participant designated to make the decision, based on input from the whole set of participants.

There are, however, occasions when a local or distributed resource manager might make a commit or backout decision on its own. This decision is called a heuristic decision because it is made by a resource manager that is not designated to make the final decision for the UR as a whole. Installation personnel usually are involved in making a heuristic decision. For example:
  • Suppose a system involved in distributed resource processing is hung. Installation personnel use RRS panels to resolve any URs in an in-doubt state. The installation might commit the UR on one system, but the resource managers or installation personnel might back out the UR on another system.
  • Database locks are being held too long because one or more resource managers or applications involved in a UR failed in a way that is not detectable by RRS. A heuristic decision must be made to free locked resources. Since RRS does not limit transaction duration, properly designed resource managers should track resource lock hold durations and either automatically make a heuristic decision after an excessive time has passed, or warn installation personnel that they should make a heuristic decision.
There are three possible heuristic conditions
  • Heuristic commit (HC): A heuristic decision to commit some of the protected resources associated with a UR.
  • Heuristic reset (HR): A heuristic decision to back out some of the protected resources associated with a UR.
  • Heuristic mixed (HM): Inconsistent commit or backout decisions for a UR. One of the decisions is heuristic.

Any heuristic condition is a problem because it often means that there have been inconsistent changes to protected resources. Resolving the problem might require manual intervention.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014