From: Date: June 13 2005 9:09am Subject: bk commit into 4.1 tree (joreland:1.2283) BUG#10294 List-Archive: http://lists.mysql.com/internals/25914 X-Bug: 10294 Message-Id: <20050613070955.AF3AF1511F9@eel.ndb.mysql.com.ndb.mysql.com> Below is the list of changes that have just been committed into a local 4.1 repository of jonas. When jonas does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2283 05/06/13 09:09:50 joreland@stripped +1 -0 bug#10294 - ndb restore with #concurrent transactions < parallelism Enable retry on startTransaction ndb/tools/restore/consumer_restore.cpp 1.12 05/06/13 09:09:48 joreland@stripped +16 -8 Enable retry on startTransaction==NULL # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: joreland # Host: eel.ndb.mysql.com.ndb.mysql.com # Root: /home/jonas/src/mysql-4.1 --- 1.11/ndb/tools/restore/consumer_restore.cpp Wed Jun 8 16:48:54 2005 +++ 1.12/ndb/tools/restore/consumer_restore.cpp Mon Jun 13 09:09:48 2005 @@ -288,12 +288,11 @@ cb->connection = m_ndb->startTransaction(); if (cb->connection == NULL) { - /* - if (errorHandler(cb)) - { + if (errorHandler(cb)) + { + m_ndb->sendPollNdb(3000, 1); continue; - } - */ + } exitHandler(); } // if @@ -409,9 +408,17 @@ */ bool BackupRestore::errorHandler(restore_callback_t *cb) { - NdbError error= cb->connection->getNdbError(); - m_ndb->closeTransaction(cb->connection); - cb->connection= 0; + NdbError error; + if(cb->connection) + { + error= cb->connection->getNdbError(); + m_ndb->closeTransaction(cb->connection); + cb->connection= 0; + } + else + { + error= m_ndb->getNdbError(); + } Uint32 sleepTime = 100 + cb->retries * 300; @@ -426,6 +433,7 @@ break; case NdbError::TemporaryError: + err << "Temporary error: " << error << endl; NdbSleep_MilliSleep(sleepTime); return true; // RETRY