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

[BUG] WARNING It was not possible to process file: because real_db_name isn't found. #837

Closed
bmesich opened this issue Sep 23, 2022 · 9 comments · Fixed by #858
Closed
Labels

Comments

@bmesich
Copy link

bmesich commented Sep 23, 2022

Describe the bug
When attempting to restore a database, I am getting the following warning:

** (myloader:124446): WARNING **: 11:38:56.769: It was not possible to process file: sitemanager.tutorials_tbl-metadata (2) because real_db_name isn't found. We might renqueue it, take into account that restores without schema-create files are not supported

This is very similar to the issue 683 and appears to have been fixed in 708. In this case, a WARNING is being generated rather than a CRITICAL log severity.

To Reproduce
I used more-or-less the same steps to reproduce the warning as was shown in issue 683

MySQL Console

create database sitemanager;
use sitemanager;
create table tutorials_tbl(
tutorial_id INT NOT NULL AUTO_INCREMENT,
tutorial_title VARCHAR(100) NOT NULL,
tutorial_author VARCHAR(40) NOT NULL,
submission_date DATE,
PRIMARY KEY ( tutorial_id )
);

BASH Shell

mydumper --routines --triggers -S /var/lib/mysql/mysql.sock -o /backup-prep/sitemanager -B sitemanager
myloader -S /var/lib/mysql/mysql.sock -d /backup-prep/sitemanager

myloader generates the following WARNING:

** (myloader:124446): WARNING **: 11:38:56.769: It was not possible to process file: sitemanager.tutorials_tbl-metadata (2) because real_db_name isn't found. We might renqueue it, take into account that restores without schema-create files are not supported

What mydumper and myloader version has been used?
myloader 0.12.7-3, built against MySQL 10.6.9
mydumper 0.12.7-3, built against MySQL 10.6.9-MariaDB

Expected behavior
It would appear that the database is restored successfully if the WARNING log messages are ignored. Perhaps this WARNING should be suppressed or prevented from appearing.

Log

** Message: 12:02:07.520: Server version reported as: 10.6.9-MariaDB-log
** Message: 12:02:07.523: Intermediate queue ending

** (myloader:125010): WARNING **: 12:02:07.524: It was not possible to process file: sitemanager.tutorials_tbl-metadata (2) because real_db_name isn't found. We might renqueue it, take into account that restores without schema-create files are not supported
** Message: 12:02:07.524: Thread 1 restoring create database on `sitemanager` from sitemanager-schema-create.sql
** Message: 12:02:07.524: Intermediate thread ended
** Message: 12:02:07.524: Intermediate thread ended
** Message: 12:02:07.524: Thread 1: Data import ended
** Message: 12:02:07.524: Thread 3: Data import ended
** Message: 12:02:07.524: Thread 3: Starting post import task over table
** Message: 12:02:07.524: Thread 2 restoring table `sitemanager`.`tutorials_tbl` from //backup-prep/sitemanager/sitemanager.tutorials_tbl-schema.sql
** Message: 12:02:07.524: Thread 2: Creating table `sitemanager`.`tutorials_tbl` from content in //backup-prep/sitemanager/sitemanager.tutorials_tbl-schema.sql
** Message: 12:02:07.524: Thread 1: Starting post import task over table
** Message: 12:02:07.524: Thread 4: Data import ended
** Message: 12:02:07.524: Thread 4: Starting post import task over table
** Message: 12:02:07.530: Thread 2: Data import ended
** Message: 12:02:07.530: Thread 2: Starting post import task over table
** Message: 12:02:07.531: Starting table checksum verification

Backup

-rw-r--r-- 1 root root  75 Sep 23 11:33 metadata
-rw-r--r-- 1 root root  98 Sep 23 11:33 sitemanager-schema-create.sql
-rw-r--r-- 1 root root   1 Sep 23 11:33 sitemanager.tutorials_tbl-metadata
-rw-r--r-- 1 root root 377 Sep 23 11:33 sitemanager.tutorials_tbl-schema.sql

How to repeat
See steps above to repeat. Note that using "-B ${DB_NAME}" argument to myloader will suppress the log WARNING.

Environment (please complete the following information):

  • OS version: RHEL9.0
  • MyDumper version: mydumper 0.12.7-3, built against MySQL 10.6.9-MariaDB
@bmesich bmesich added the bug label Sep 23, 2022
@davidducos
Copy link
Member

I think that we don't print any message if a metadata file is processed, so we don't know if the file was processed but I think that we are successfully processing those files.
I'm agree that we can remove the Warning, we can move to debug and just print a warning or critical if a file was not processed because it reaches to the maximal amount of attempts which is 5.

@davidducos davidducos added this to the Release 1.0.1-1 milestone Sep 24, 2022
@fenidik
Copy link

fenidik commented Sep 27, 2022

Have same issue. You should test with data. Because when I'm trying to restore it creates schema but not uploading the data.

mydumper --compress --defaults-file .my.cnf -t 10 # defaults file only contains db credentials
myloader --defaults-file ../.my.cnf -t 10 -d .

@davidducos
Copy link
Member

@fenidik, we are testing with data. Can you give more details about your issue? MyDumper version used? Database version? a test case with CREATE TABLE and INSERT statements?

@bigkahuna1986
Copy link

bigkahuna1986 commented Oct 19, 2022

Also have the same issue as @fenidik. myloader is producing a huge amount of warnings but not restoring any data.

$ myloader --version
myloader 0.12.7-3, built against MySQL 8.0.29-21

Server version: 10.6.10-MariaDB-1:10.6.10+maria~ubu2004-log mariadb.org binary distribution

My workflow is I restore our production database to my workstation from a mysqldump. We have about 100 databases most of which are less than 100mb (total size is around 15gb, biggest DB is just over 1gb). At this point I launch our application and run tests with no problems so I know the restore worked. Then I create a dump file using the following command:
$ mydumper --defaults-file mydumper.conf --regex 'my_dbs_prefix*' --outputdir /backups --compress

It's worth noting Maria is in a docker container.

The dump seems to work well, with the /backups directory containing ~625mb of gzipped data.

mydumper.conf contains:
[mydumper]
user = {redacted}
password = {redacted}
socket = /opt/mariadb/var/mysql.sock

[myloader]
user = {redacted}
password = {redacted}
socket = /opt/mariadb/var/mysql.sock
innodb-optimize-keys = AFTER_IMPORT_PER_TABLE

Since this is production data I can't upload that as a test case. I'll try to find something smaller

Load command:
myloader --directory /backups --defaults-file mydumper.conf --queries-per-transaction 5000 --threads 8 --overwrite-tables

At this point, myloader seems to create begin overwriting the first table but never does the work. For about 90 seconds Maria has moderate CPU usage (~30-50%), then goes completely idle. myloader is using 100% CPU, Maria is idle and can be restarted. I have to kill -9 the process.

EDIT
I removed the innodb-optimize-keys = AFTER_IMPORT_PER_TABLE option from the conf, and it now finishes in 8 minutes. Still has a ton of warning messages as per the OP.

@davidducos
Copy link
Member

Hi @bigkahuna1986,
Can you test latest prerelease (v0.13.0-6) and let me know if you see your issue with it?

@davidducos davidducos linked a pull request Nov 18, 2022 that will close this issue
@lizhongxuan
Copy link

I get the same error. When backing up a database, restore cannot use its original name. Otherwise, an error will be reported.

backup: mydumper -h 127.0.0.1 -u root -p abc123 -P 3306 -B testdb -r 1000000 -c -o ./

error recovery: myloader -h 127.0.0.1 -u root -p abc123 -P 3306 -B testdb -o -d ./

true recovery : myloader -h 127.0.0.1 -u root -p abc123 -P 3306 -o -d ./

@davidducos
Copy link
Member

@Vega-Punk what version are you using?

@lizhongxuan
Copy link

@Vega-Punk你用的是什么版本?

mydumper 0.12.3-3, built against MySQL 5.7.37-40
myloader 0.12.3-3, built against MySQL 5.7.37-40

centos7.6 3.10.0-693.el7.x86_64

@davidducos
Copy link
Member

Please, test with the latest prerelease.

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.

5 participants