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

Allow configuring max chunk size #7

Merged
merged 4 commits into from
Apr 24, 2024
Merged

Conversation

lulf
Copy link
Member

@lulf lulf commented Apr 24, 2024

Changes the magic since it breaks existing on-disk format

Changes the magic since it breaks existing on-disk format
@Dirbaio
Copy link
Member

Dirbaio commented Apr 24, 2024

  • i'd make MAX_CHUNK_SIZE the min of the old formula and the user-configured value. This way there's no RAM "wasted" if page_size - headers is smaller.
  • to make sure ekv doesn't attempt to mount an old disk image at all, change the magics in MetaHeader, DataHeader. Changing just the chunk magic will make it mount it but see all pages as empty.

@lulf
Copy link
Member Author

lulf commented Apr 24, 2024

  • i'd make MAX_CHUNK_SIZE the min of the old formula and the user-configured value. This way there's no RAM "wasted" if page_size - headers is smaller.

I think this would require using const_trait_impl in order to get const min().

@lulf
Copy link
Member Author

lulf commented Apr 24, 2024

Nevermind, just did it manually :)

Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 thank you!

@Dirbaio Dirbaio added this pull request to the merge queue Apr 24, 2024
Merged via the queue into main with commit 0f8b292 Apr 24, 2024
1 check passed
@lulf lulf deleted the configurable-max-chunk-size branch April 25, 2024 07:20
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

Successfully merging this pull request may close these issues.

2 participants