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

Panic at search when the trees need a rebuild #77

Merged
merged 7 commits into from
Jun 20, 2024
Merged

Conversation

irevoire
Copy link
Member

Pull Request

Related issue

Fixes #74

What does this PR do?

  • Ensure the database has been fully built before attempting any search request (=> there are no items to update)
  • Delete the updated item list instead of emptying it
  • Provide a new method on the Writer to know if we need to build the tree or can simply drop the writer
  • Add a new test
  • Return an error message instead of panicking when a key is missing

@irevoire irevoire added bug Something isn't working breaking Something that will break in the next release db-breaking labels Jun 20, 2024
@irevoire irevoire requested a review from Kerollmops June 20, 2024 12:22
src/error.rs Outdated Show resolved Hide resolved
src/error.rs Outdated Show resolved Hide resolved
src/reader.rs Outdated Show resolved Hide resolved
src/tests/writer.rs Outdated Show resolved Hide resolved
Co-authored-by: Clément Renault <clement@meilisearch.com>
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.

I love that!

src/error.rs Outdated Show resolved Hide resolved
@irevoire irevoire merged commit 8aaeae7 into main Jun 20, 2024
8 checks passed
@irevoire irevoire deleted the panic-at-search branch June 20, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Something that will break in the next release bug Something isn't working db-breaking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reader do not detect that the database has been partially updated
2 participants