GATE / CS ARCHIVE

GATE CSE 2021 SET 1 / QUESTION 13

GATE CSE 2021 Set 1 Q13

Database Management Systems · Recovery & Logging · Full GATE CSE 2021 Set 1 paper

GATE 2021 Set 1, Q13 1 mark · MSQ
Report issue

Recovery & Logging

Question 13, GATE 2021: A database crashes again while recovering from a previous crash. No checkpoints are taken during transactions or recovery. Select correct statements in the intended basic recovery model. A the same undo and redo lists are used on restarting recovery; B further recovery is impossible; C transactions already undone/redone will not be recovered again; D the database becomes inconsistent.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A

Our answer: A in the basic repeated undo/redo model

Without a new checkpoint or changed transaction-completion history, restarting recovery analyzes the same log to identify the same committed and uncommitted transactions. Undo/redo actions are designed to be idempotent, so a second crash does not make recovery impossible or inherently inconsistent. Thus A in the intended basic log-recovery model. An implementation with compensation log records may track already completed recovery work more precisely; the answer is not a universal claim that every recovery algorithm literally repeats an unchanged physical work list.

Redo reapplies logged updates for transactions whose effects must survive; undo removes effects of incomplete transactions. Idempotence means redo(redo(state))=redo(state), with corresponding safe repeated undo semantics. A crash can leave only a prefix of recovery finished, so a correct recovery design cannot assume that restarting itself destroys consistency. No new checkpoint is available to certify that the earlier log prefix can be ignored. More elaborate logging of recovery work is precisely the qualification already retained above.

Original paper, page 18 · Answer key