CS 357: Database Systems Implementation
Homework Assignment 4 -- Recovery
| Given: |
Wednesday, 13 February |
| Due Date: |
Friday, 22 February |
Implement non-quiescent checkpointing. You will need to do the following things:
- Create a new class NQCheckpoint to handle the non-quiescent checkpoint record.
- Modify classes LogRecord and LogRecordIterator to understand NQCheckpoint records.
- Modify the Transaction
constructor so that it keeps track of the currently-active
transactions, and every N transactions, to call the recovery manager to
write a non-quiescent checkpoint record. (Pick a reasonable value
for N.)
- Add a method checkpoint to RecoveryMgr that writes a non-quiescent checkpoint record.
- Modify the recover method in RecoveryMgr
to recognize and handle non-quiescent checkpoint records. Also
modify it to print out the log records as it encounters them.
To test your code, run several JDBC programs, modified so that some of them
sleep for a while before committing. When all are running, stop
the server. Then bring up the server again, and see what gets
printed during recovery.
Submit a printout of each file you create or modify, with changes
indicated for files you modify.