Description of problem: Snapshot save big data(500000 rows) and restored it. Then there will be no data in mysql. Version-Release number of selected component (if applicable): Devenv_3319 How reproducible: always Steps to Reproduce: 1. create an php app and embed mysql cartridge to it # rhc app create php php-5.3 -predhat # rhc cartridge add mysql-5.1 -a php -predhat 2.ssh longin app ,create tables 'info' # ssh 51aedd014c83d2073f000001.rhcloud.com >mysql >use php > CREATE TABLE IF NOT EXISTS info(id INT NOT NULL AUTO_INCREMENT, datt a CHAR(200), PRIMARY KEY (id)); 3. use script insert 500000 rows data to table 'info' while (i<500000);do mysql -Dphp -e "INSERT INTO info VALUES(NULL, 'This is testing data for testing snapshoting and restoring big data in mysql database.');" done 4. Snapshot save app # rhc snapshot save php -predhat 5. Login mysql from app's cartridge , delete info table # ssh 51aedd014c83d2073f000001.rhcloud.com >mysql -Dphp -e "drop table info" 6. Snapshot restore app #rhc snapshot restore app -f php.tar.gz -predhat 7. Login mysql to check if the data is restored Actual results: table 'info' have not found. Expected results: Table restore should be successed,and 500000 rows data existed in mysql Additional info: I tried write 10 rows data to mysql, snapshot save and restore is successed
I am trying to reproduce this. This script will create the data quicker because it's only making a single mysql call. ruby -e "1000000.times{puts 'INSERT INTO info VALUES(NULL,\'This is testing data for testing snapshoting and restoring big data in mysql database.\');'}" > /tmp/insert.sql && mysql -D $OPENSHIFT_APP_NAME < /tmp/insert.sql
I've modified the mysql dump to be a little smaller using --extended-insert as well as speeding up the restore by turning off autocommit and some data checks. This is working in my manual testing. I will run the extended database tests and then submit a pull request.
Testing this PR now: https://github.com/openshift/origin-server/pull/2891
PR is currently merging, should be available for testing shortly
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/24fbcce38965191489916c30736927300350eeca Bug 970914 - Mysql big data snapshot restore failed
Verfied on devenv_3383.