reset password
Author Message
HuanXue
Posts: 34
Posted 23:46 Nov 07, 2010 |

What I have done is two lines like this for each buffer:

Buffer 0 is pinned.
simpledb.buffer.Buffer@16a55fa[file buffer.test, block 0]

Is it what we should output?

cysun
Posts: 2935
Posted 06:59 Nov 08, 2010 |

When you print the buffer pool, for each buffer you should print the block number and pin count. You may print additional information (e.g. pin time, unpin time etc) if you want.

rhardytran
Posts: 8
Posted 15:00 Nov 10, 2010 |
cysun wrote:

When you print the buffer pool, for each buffer you should print the block number and pin count. You may print additional information (e.g. pin time, unpin time etc) if you want.

pin count is the Block private variable.  Do you still want pin count in the output? or isPin is adequate to know that pin count is either zero (0) or greater?

cysun
Posts: 2935
Posted 15:05 Nov 10, 2010 |
rhardytran wrote:
cysun wrote:

When you print the buffer pool, for each buffer you should print the block number and pin count. You may print additional information (e.g. pin time, unpin time etc) if you want.

pin count is the Block private variable.  Do you still want pin count in the output? or isPin is adequate to know that pin count is either zero (0) or greater?

isPin is fine.