User Guide

SAP AG November 2002
Redo List
The redo list is an internal database list of transactions [Page 152], which is in the main
memory. The redo list is created by the redo log manager [Page
49].
If, during a restart or recovery [Page 49], the log reader [Page 50] finds a COMMIT [Page
129] in a redo log file [Page 50] for the whole transaction, this transaction is entered in the
redo list.
The redo tasks [Page
51] use the redo list to determine the transactions that need to be
repeated, and the sequence in which they are to be executed. The sequence for executing
the transactions, defined in the redo list, is important to ensure that the same data is not
changed simultaneously.
Redo Task
Redo tasks are active components during a restart or recovery [Page 49]. Redo tasks are
server tasks [Page
16].
Actions
COMMIT transactions
1. In the redo list [Page 51], the redo tasks look for transactions [Page 152] that were
completed with a COMMIT [Page 129], and are therefore ready to be re-imported. In the
redo list, the transactions are sorted by the log sequence numbers of their COMMIT.
2. The redo task starts by processing the transaction with the lowest COMMIT log sequence
number.
The redo log files [Page 50] that belong to this transaction are processed in sequence.
If a redo log entry [Page 44] of this redo log file has a higher log sequence number than
the lowest COMMIT log sequence number, it cannot be processed. In this case, the redo
task waits for the COMMIT of the other transaction. Only then can the redo task continue
processing the redo log file.
This mechanism ensures consistent data.
3. Once a COMMIT transaction has been processed in full, the redo task deletes the redo
log file and the undo log file [Page
48] of the transaction. The transaction is removed from
the redo list.
ROLLBACK transactions
1. In the redo list, the redo tasks look for transactions that were completed with a
ROLLBACK [Page 147].
2. The redo tasks delete the relevant redo log files. This prevents the transaction being
redone unnecessarily.
3. If the ROLLBACK transaction started before the savepoint, the redo task evaluates the
undo log file of the transaction, in order to set the transaction to the state before the
savepoint. Once the ROLLBACK transaction has been fully processed, the redo task
deletes the undo log file of the transaction.
If the ROLLBACK transaction started after the savepoint [Page 149], the redo task does
not process the transaction further.
See also:
Example: Restart [Page
52]
User Manual: SAP DB 51