Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record assumptions about disk page size in one central location #143

Open
jorisdral opened this issue Mar 27, 2024 · 1 comment
Open

Record assumptions about disk page size in one central location #143

jorisdral opened this issue Mar 27, 2024 · 1 comment

Comments

@jorisdral
Copy link
Collaborator

There are a few parts of the code that assume the the disk page size is 4096. We should record this number in a central place. This should also make it easier for us to support larger page sizes later

Example: https://github.com/IntersectMBO/lsm-tree/pull/130/files#diff-259998897e992a96628fa4b64af4e2b100710b2c69a01497d0158abc3f0a98b9R156-R163

@jorisdral jorisdral changed the title Record assumptions about disk page size in one place Record assumptions about disk page size in one central location Mar 27, 2024
@mheinzel
Copy link
Collaborator

So the goal of this is not to already already allow changing the number (with things still working), but to make it easy to find all places that would need to change, right?
So all usages of a pageSize constant would be easy to find. Other places (like the example linked above) might not easily be changed to use the constant, but we could have a convention to at least include an assert or comment mentioning the assumption pageSize == 4096.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants