Previous | Next --- Slide 53 of 64
Back to Lecture Thumbnails
Sherry

Why "for eager versioning, need a 2nd cache write for undo log"?

subliminal

@Sherry: Because, on an abort in an eager versioning system, we need to rewrite the old value stored in the undo log back into the cache.

aznshodan

@subliminal: can't you use the same logic to argue that for lazy versioning, we need to rewrite the new value stored in the write buffer into the cache.

So both lazy and eager versioning need 2nd cache write? why do we need 2nd cache write for only eager versioning?

uncreative

@aznshodan I think that for lazy versioning, we only need to write to the buffer. Since we don't actually change the data until the end of our transaction. So at each step we write to our buffer, and then at the end of the transaction, if we choose to commit, we empty our buffer by writing it all to the cache. I'm not super sure about this though.

toutou

How can the second w bit be used as undo-log? What it records?