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; then the system gives control to any resource managers that are present.
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 the latest FRR created is FRR(3).
  3. The system gives control to FRR(3) first.
  4. FRR(3) percolates to FRR(2), which percolates to FRR(1).
  5. FRR(1) also percolates, so the system looks for ESTAE-type recovery routines, and finds that ESTAEX(4) was the last one created.
  6. The system gives control to ESTAEX(4) first.
  7. ESTAEX(4) percolates to ARR(3), which percolates to ESTAE(2), which percolates to ESTAI(1).
  8. ESTAI(1) also percolates, and no other recovery routines are activated, so the system abnormally ends the mainline routine, and passes control to any resource managers that are present.
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

ieaa8srr