Understanding how routines in a recovery environment interact

Figure 1 is a very simplified illustration of how routines in a recovery environment interact. In this figure, only one recovery routine exists, and it is an ESTAE-type recovery routine. The following sequence of events might occur:
  1. The mainline routine encounters an error.
  2. The system gets control.
  3. The system looks for recovery routines and finds an ESTAE-type recovery routine called ESTAEX.
  4. The ESTAEX routine either retries or percolates.
    1. If the ESTAEX routine retries, it returns control to a retry point in the mainline routine. The mainline routine continues processing.
    2. If the ESTAEX routine percolates, the system gets control and abnormally ends the mainline routine.
Figure 1. Mainline Routine with One Recovery Routine

iea99orr

Figure 2 shows a more complex situation. Several recovery routines exist, and each one that is entered has the opportunity to retry or to percolate. The following sequence of events might occur if all recovery routines percolate:
  1. The mainline routine encounters an error.
  2. The system looks for recovery routines, and finds that ESTAEX(3) was the last one created.
  3. The system gives control to ESTAEX(3) first.
  4. ESTAEX(3) percolates to ESTAE(2), which percolates to ESTAI(1).
  5. ESTAI(1) also percolates, and no other recovery routines are activated, so the system abnormally ends the mainline routine.
Had any of the recovery routines decided to retry, the system would have returned control to the retry point, and the mainline routine might have ended normally.
Figure 2. Mainline Routine with Several Recovery Routines

iea99srr