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

Dump import crashed when dump file is created out of empty MeiliSearch #1701

Closed
bidoubiwa opened this issue Sep 13, 2021 · 3 comments · Fixed by #1787
Closed

Dump import crashed when dump file is created out of empty MeiliSearch #1701

bidoubiwa opened this issue Sep 13, 2021 · 3 comments · Fixed by #1787
Labels
bug Something isn't working as expected
Projects
Milestone

Comments

@bidoubiwa
Copy link
Contributor

bidoubiwa commented Sep 13, 2021

Describe the bug
When creating a dump on an empty MeiliSearch instance, the dump is created correctly but when launching it using --import-dump the launch fails with the following error:

Error: No such file or directory (os error 2)

But the file does exists.

To Reproduce
Steps to reproduce the behavior:

  1. Launch empty MeiliSearch instance
  2. Create dump
  3. Wait for dump completion
  4. Stop and restart meilisearch with --import-dump
  5. Error: Error: No such file or directory (os error 2)

Expected behavior
No crash

MeiliSearch version:
v0.22.0

@curquiza curquiza added the bug Something isn't working as expected label Sep 13, 2021
@curquiza curquiza added this to Candidates in Bug triage via automation Sep 13, 2021
@curquiza curquiza moved this from Candidates to Bugs - severity 2 in Bug triage Sep 13, 2021
@curquiza curquiza added the good first issue Good for newcomers label Sep 13, 2021
@curquiza curquiza moved this from Bugs - severity 2 to Bugs - severity 3 in Bug triage Sep 13, 2021
@curquiza
Copy link
Member

Thank you @bidoubiwa for this report!

@rubiagatra
Copy link

Hello @curquiza, I am using Meilisearch in production and I want to start to contribute.

This is a good first issue, Any idea how I can explore this one?

@irevoire
Copy link
Member

Hi @rubiagatra.
I think I can give you some little hints,

  1. When you generate a dump, the xxxxx-yyyyy.dump file generated is actually a .tar.gz file. So if you want to see the content of a dump you can run: tar xzf 20210920-091520164.dump to uncompress it.
  2. The file creating the dump is located here: meilisearch-http/src/index_controller/dump_actor/actor.rs
  3. The file extracting the dump is located here: meilisearch-http/src/index_controller/dump_actor/loaders/v2.rs

And to give you a vague idea of what is happening when we create a dump:

  1. We stop everyone from doing anything with a “mutex tricks”
  2. Then each actor dump itself

Also maybe you missed it but there is a little bit of documentation explaining how to navigate in the codebase: in the lib.rs

@curquiza curquiza linked a pull request Oct 7, 2021 that will close this issue
@curquiza curquiza added this to the v0.24.0 milestone Oct 18, 2021
@bors bors bot closed this as completed in d905bbf Oct 27, 2021
Bug triage automation moved this from Bugs - severity 3 to Done Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants