reset password
Author Message
alomo
Posts: 70
Posted 15:22 Aug 16, 2009 |

Consider the example on Nonquiescent Checkpoint from the lecture slides.

It seems that the order of active transaction in the <NQCKPT 0, 2> is important because this is the way we find the earliest uncommitted transaction.

How do we obtain the numbers of active transaction to write the <NQCKPT>? Is there a list of active transaction that we could read at any moment?

Last edited by alomo at 15:23 Aug 16, 2009.
cysun
Posts: 2935
Posted 16:40 Aug 16, 2009 |
alomo wrote:

Consider the example on Nonquiescent Checkpoint from the lecture slides.

It seems that the order of active transaction in the <NQCKPT 0, 2> is important because this is the way we find the earliest uncommitted transaction.

I don't know what you mean. I don't see any difference whether it's <NQCKPT 0,2> or <NQCKPT 2,0>.

alomo wrote:

How do we obtain the numbers of active transaction to write the <NQCKPT>? Is there a list of active transaction that we could read at any moment?

SimpleDB does not have it right now, but you can modify the Transaction class to keep a list of active transactions. For example, change the Transaction constructor to add current transaction to the list, and then remove it in commit()/abort().

alomo
Posts: 70
Posted 21:43 Aug 16, 2009 |
cysun wrote:
alomo wrote:

Consider the example on Nonquiescent Checkpoint from the lecture slides.

It seems that the order of active transaction in the <NQCKPT 0, 2> is important because this is the way we find the earliest uncommitted transaction.

I don't know what you mean. I don't see any difference whether it's <NQCKPT 0,2> or <NQCKPT 2,0>.

So we perform the Undo Recovery until we found <START, 0> or <START, 2> (the closest one to the <NQCKPT 2,0>), and then we stopped. Is that correct?

cysun
Posts: 2935
Posted 07:59 Aug 17, 2009 |
alomo wrote:
cysun wrote:
alomo wrote:

Consider the example on Nonquiescent Checkpoint from the lecture slides.

It seems that the order of active transaction in the <NQCKPT 0, 2> is important because this is the way we find the earliest uncommitted transaction.

I don't know what you mean. I don't see any difference whether it's <NQCKPT 0,2> or <NQCKPT 2,0>.

So we perform the Undo Recovery until we found <START, 0> or <START, 2> (the closest one to the <NQCKPT 2,0>), and then we stopped. Is that correct?

Remember that we keep a list of committed/finished transactions when we scan backward, so when we get to a <NQCKPT, t1,...,tn>, we can ignore the ones on the list that are already finished. Among the rest of the transactions on the list, we need to reach the earliest <START> before we stop. Note that "earliest" means the farthest away from <NQCHPT>, not the closest. For example:

 

<START,23>

...

<START,12>

...

<START,45>

...

<NQCKPT 23,12,45>

...

<COMMIT,23>

...

 

In this example we scan back up to <START,12>.