The following is a sequence of undo-log records written by two transactions T an
ID: 3917364 • Letter: T
Question
The following is a sequence of undo-log records written by two transactions T and U: < START T >; < T, A, 10 >; < START U >; < U,B, 20 >; < T, C, 30 >; < U,D, 40 >; < COMMIT U >; < T, E, 50 >; < COMMIT T >. Describe the actions of the recovery manager, including changes to both disk and the log, if there is a crash and the last log record to appear on the disk is
1. (5 Points) < START U >
2. (5 Points) < T, E, 50 >
3. (5 Points) < COMMIT T >
Explanation / Answer
<START T >;
< T, A, 10 >;
< START U >;
< U,B, 20 >;
< T, C, 30 >;
< U,D, 40 >;
< COMMIT U >;
< T, E, 50 >;
< COMMIT T >
-------------------------------------------------------------------------------------------------------------------------------------
1. (5 Points) < START U >
Recovery action in this case will be undo(T) and undo(U). A is restored to its original value.
log records < T, A, 10 >, <T,abort>; are written out.
-------------------------------------------------------------------------------------------------------------------------------------
2. (5 Points) < T, E, 50 >
Recovery action in this case will be undo(T) and redo(U). A and C is restored to its original value.
B and D are set to 20 and 40.
log records < T, C, 30 >, < T, A, 10 >, <T,abort>; are written out.
-------------------------------------------------------------------------------------------------------------------------------------
3. (5 Points) < COMMIT T >
Recovery action, in this case, will be redo(T) and redo(U). A and C are set to 10 and 30.
B and D are set to 20 and 40.
-------------------------------------------------------------------------------------------------------------------------------------
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.