This lab explores recovery using a write-ahead log.
In this lab, you will implement undo-redo recovery using a write-ahead log. The log records will be stored in a file and contain the data item values before/after an update and checkpoints. Our data items will be identified by a single letter. Your goal is to write the code that given a current state of the database will recover the database to the correct state based on the log file.
The code file to modify is Recovery.java
. Test using the JUnit test file TestRecovery.java
.
Note: The checkpoint end record contains the item values at the end of the checkpoint. During pass #1, make sure to set the item values to those in the checkpoint end so that the database will be recovered to the proper state.
The lab can be marked immediately by the professor or TA by showing the output of the JUnit tests and by a quick code review. Otherwise, submit the URL of your GitHub repository on Canvas. Make sure to commit and push your updates to GitHub.