NITCbase / nitcbase.github.io

The entire documentation on implementing the NITCbase project.
https://nitcbase.github.io/
MIT License
10 stars 6 forks source link

Constructor - 1 will keep the error code in the BlockNum field -> caller must check if the blockNum is error or not #40

Closed gokulsreekumar closed 1 year ago

gokulsreekumar commented 2 years ago
gokulsreekumar commented 2 years ago

The callers of this constructor and the following constructors: RecBuffer :: RecBuffer() (Constructor 1), IndBuffer :: IndBuffer() (Constructor 1), IndInternal :: IndInternal() (Constructor1) and IndLeaf :: IndLeaf() (Constructor 1) should check the value of blockNum field to verify if the disk block was allocatted succesfully.

gokulsreekumar commented 2 years ago

Done, Except for the Indexing part changes. ba_insert() method is the only place where constructor 1 of RecBuffer is being called to allocate a new block.

Basic Idea → It is only called when we need more space