ekinoguz / sprout-database

Database project of a graduate class.
0 stars 0 forks source link

PF_FileHandle needs to pass GetNumberOfPages #1

Closed diedthreetimes closed 11 years ago

diedthreetimes commented 11 years ago

Currently GetNumberOfPages will read the number of pages directly from disk. This is incorrect usage, if the file has dirty pages stored in the cache (specifically new dirty pages).

I'm not sure what the best way to handle it is, maybe check to see if there are any new dirty pages before returning the final page count?

cesarghali commented 11 years ago

Check the answer in here https://github.com/ekinoguz/cs222-database/issues/5#issuecomment-16755940