We will begin by taking a few minutes to complete evaluations for the lab component of the course.
Your evaluations are anonymous, and we will not receive the results until after all final grades have been submitted.
Comments in the text fields are valued and encouraged. Please try to answer all questions, but if a question is not applicable or you do not wish to answer it, you can simply skip it.
Here is the URL that you should use: https://bu.bluera.com/bu/
Enter your BU login name and Kerberos password, and complete the evaluation for your CS 460 lab section (the one that is not A1). Please do not evaluate the lectures at this time.
When you are done with the survey, please close the separate browser tab.
Thanks in advance for taking the time to provide your feedback about the labs!
Based on the log shown below, answer the following questions.
LSN | transaction | action | item | old value | new value |
---|---|---|---|---|---|
00 | T1 | begin | |||
10 | T1 | update | D1 | 100 | 70 |
20 | T2 | begin | |||
30 | T1 | commit | |||
40 | T2 | update | D1 | 70 | 400 |
60 | T2 | update | D3 | “hello” | “howdy” |
70 | T3 | begin | |||
80 | T3 | update | D2 | 15 | 70 |
90 | T2 | commit | |||
100 | T3 | update | D1 | 400 | 55 |
crash |
Recall that we discussed three types of logging: undo-redo, undo-only and redo-only.
How can we can determine from looking at the log that the system is performing undo-redo logging?
At the start of recovery, what are the possible on-disk values of each data item?
If the system were using undo-only logging instead, what are the possible on-disk values of each data item at the start of recovery? You should assume that each data item is on a different page of the database file.
If the system were using redo-only logging instead, what are the possible on-disk values of each data item at the start of recovery? You should assume that each data item is on a different page of the database file.
Consider again the log shown below:
LSN | transaction | action | item | old value | new value |
---|---|---|---|---|---|
00 | T1 | begin | |||
10 | T1 | update | D1 | 100 | 70 |
20 | T2 | begin | |||
30 | T1 | commit | |||
40 | T2 | update | D1 | 70 | 400 |
60 | T2 | update | D3 | “hello” | “howdy” |
70 | T3 | begin | |||
80 | T3 | update | D2 | 15 | 70 |
90 | T2 | commit | |||
100 | T3 | update | D1 | 400 | 55 |
crash |
During recovery, what steps would be taken during the first pass through the log if the system is using undo-redo logging?
What steps would be taken during the second pass through the log?
How would the log and the recovery process be different under undo-only logging?
How would the log and the recovery process be different under redo-only logging?
Now assume that the system is performing logical logging, which means:
each on-disk data item must have a corresponding datum LSN, which is the LSN of the log record that produced the value
each update log record must include the old log sequence number (the olsn), as shown below. The olsn is the LSN of the log record that produced the data item’s previous value.
LSN | transaction | action | item | old value | new value | olsn |
---|---|---|---|---|---|---|
00 | T1 | begin | ||||
10 | T1 | update | D1 | 100 | 70 | 0 |
20 | T2 | begin | ||||
30 | T1 | commit | ||||
40 | T2 | update | D1 | 70 | 400 | 10 |
60 | T2 | update | D3 | “hello” | “howdy” | 0 |
70 | T3 | begin | ||||
80 | T3 | update | D2 | 15 | 70 | 0 |
90 | T2 | commit | ||||
100 | T3 | update | D1 | 400 | 55 | 40 |
crash |
What other changes to the log would typically be made under logical logging?
What is the purpose of storing the olsn and datum LSN values?
At the start of recovery, assume that we have the following on-disk datum LSNs:
Trace through the steps taken during the backward and forward passes for the log above.
Now let’s assume that a dynamic checkpoint occurred between log records 40 and 60:
LSN | transaction | action | item | old value | new value |
---|---|---|---|---|---|
00 | T1 | begin | |||
10 | T1 | update | D1 | 100 | 70 |
20 | T2 | begin | |||
30 | T1 | commit | |||
40 | T2 | update | D1 | 70 | 400 |
50 | checkpoint | ||||
60 | T2 | update | D3 | “hello” | “howdy” |
70 | T3 | begin | |||
80 | T3 | update | D2 | 15 | 70 |
90 | T2 | commit | |||
100 | T3 | update | D1 | 400 | 55 |
crash |
What other information must be included in log record 50?
Given the checkpoint, do all of the log records shown need to be examined during the backward pass? During the forward pass? Why or why not?
Does the existence of the checkpoint change the possible on-disk values at the start of recovery under undo-redo logging?
Last updated on December 4, 2024.