reset password
Author Message
PoonamPawar
Posts: 16
Posted 17:52 Aug 15, 2009 |

Hello Professor,

I have doubt regarding my testfile & it's result.

I don't understand where it goes wrong.

This is my testfile.

  SimpleDB.init("studentsdb");
  Transaction oTransaction = new Transaction();
  Block oBlock = new Block("recover1.test",3);
  oTransaction.pin(oBlock);
  oTransaction.setInt(oBlock, 10, 661);
  oTransaction.setInt(oBlock, 20, 771);
  //oTransaction.commit();
   SimpleDB.logMgr().flush(100);  

When I run this it gives me result:

new transaction: 1
recovering existing database
transaction 1 committed
new transaction: 2

So,I delete all the content of simpledb.log file & run testfile again.

Still it's giving the same output as above & when I run LogViewer then it's giving output as,


Log:<COMMIT 1>
Log:<CHECKPOINT>
Log:<START 1>
Log:<COMMIT 2>
Log:<SETINT 2 [file recover1.test, block 3] 20 0>
Log:<SETINT 2 [file recover1.test, block 3] 10 0>
Log:<START 2>
Log:<COMMIT 1>
Log:<CHECKPOINT>
Log:<START 1>

I don't understand,from where this  coming..

Log:<COMMIT 1>
Log:<CHECKPOINT>
Log:<START 1>

 

Can you please give me any idea?

 

 

 

 

 

cysun
Posts: 2935
Posted 18:01 Aug 15, 2009 |
PoonamPawar wrote:

[...]

I don't understand,from where this  coming..

Log:<COMMIT 1>
Log:<CHECKPOINT>
Log:<START 1>

 

Can you please give me any idea?

Read the SimpleDB.init() code.

Read the lecture notes - the slide "Undo Recovery in SimpleDB" in recover.ppt.

PoonamPawar
Posts: 16
Posted 18:36 Aug 15, 2009 |

Ok.. Got it.

Thank you.