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

make ReservedSpace more flexible #256

Merged
merged 5 commits into from
May 1, 2024

Conversation

nolanderc
Copy link
Contributor

@nolanderc nolanderc commented Apr 29, 2024

Pull Request

Related issue

Fixes #254

What does this PR do?

  • Adds a few methods to ReservedSpace which grant access to the underlying bytes without having to go through the Write impl.
  • Adds impl std::io::Seek for ReservedSpace which allows seeking within the reserved space and thus re-write parts of the space already written.

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@nolanderc nolanderc marked this pull request as ready for review April 29, 2024 20:19
Copy link
Member

@Kerollmops Kerollmops 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 very much for your work!

However, this ReservedSpace struct and API do not seem as optimized and performance optimal as I wanted. I created a small reproduction of the issue and an example of usage at Meilisearch. Would you mind taking some time to see if you can find the design issue in this API?

heed/src/reserved_space.rs Outdated Show resolved Hide resolved
heed/src/reserved_space.rs Outdated Show resolved Hide resolved
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

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

LGTM 👏 Merging this one for v0.20.1. Thank you again!

@Kerollmops Kerollmops merged commit e05e82c into meilisearch:main May 1, 2024
8 checks passed
@Kerollmops Kerollmops added this to the v0.20.1 milestone May 1, 2024
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.

Make ReservedSpace more flexible
2 participants