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

myloader stuck while restore #719

Closed
aloks2019 opened this issue Jun 10, 2022 · 8 comments · Fixed by #727
Closed

myloader stuck while restore #719

aloks2019 opened this issue Jun 10, 2022 · 8 comments · Fixed by #727
Labels

Comments

@aloks2019
Copy link

I see that myloader took 4 hrs before starting first database creation while restore.
I started myloader and got following line in log:
**Message: 02:25:24.566: Server version reported as 5.7.12-log
<after this line myloader took 4hrs before starting first database created>

What it does at this stage?
How to tune this stage.
I had 20 millions files in backup directory.
Database size : 180gb
Total Hours: 9
Waited after 1st line :4 hrs
Actual restoration: 5 hrs

@davidducos davidducos added this to the Release 0.12.5-1 milestone Jun 10, 2022
@davidducos davidducos added the bug label Jun 10, 2022
@davidducos
Copy link
Member

Hi @aloks2019, thank you for reporting this bug! I found where is the problem and I will be fixing it soon as this is major issue.
The problem is related to the use of a new lock, as we are storing the files in a list and that was being done sequentially as, which means, that if you have millions of files it will take a lot of time to complete. I will be adding a new queue to process that in parallel and performing the sort in O(n). I will keep you posted.

@davidducos davidducos linked a pull request Jun 15, 2022 that will close this issue
@aloks2019
Copy link
Author

Thanks @davidducos for working on this.when are you planning to push it to master as we have another large restore next week?

@davidducos
Copy link
Member

hi @aloks2019,
I'm already working on branch https://github.com/mydumper/mydumper/tree/fix_719 if you want to test, it will be really useful for me.

@davidducos
Copy link
Member

BTW, @aloks2019 if you use a streamed backup, you will avoid this kind of issues

@aloks2019
Copy link
Author

aloks2019 commented Jun 16, 2022 via email

@davidducos
Copy link
Member

You are executing mydumper that saves all the files in the directory that you are using as parameter. But if you use mydumper --stream > backup.sql , you will get a single file. Then you can do cat backup.sql | myloader --stream to load the backup.
When you are using --stream on myloader, the files are going to be executed as soon as they are allowed to do it.
More info in: https://www.percona.com/blog/mydumper-stream-implementation/

@aloks2019
Copy link
Author

aloks2019 commented Jun 16, 2022 via email

@davidducos
Copy link
Member

You will need to compile it yourself:

git clone https://github.com/mydumper/mydumper.git
cd mydumper
git checkout -t origin/fix_719
cmake .
make

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

Successfully merging a pull request may close this issue.

2 participants