Commit 2d64907d authored by joreland@mysql.com's avatar joreland@mysql.com

bug#10294 - ndb restore with #concurrent transactions < parallelism

  Enable retry on startTransaction
parent 77ef82cf
...@@ -288,12 +288,11 @@ void BackupRestore::tuple_a(restore_callback_t *cb) ...@@ -288,12 +288,11 @@ void BackupRestore::tuple_a(restore_callback_t *cb)
cb->connection = m_ndb->startTransaction(); cb->connection = m_ndb->startTransaction();
if (cb->connection == NULL) if (cb->connection == NULL)
{ {
/* if (errorHandler(cb))
if (errorHandler(cb)) {
{ m_ndb->sendPollNdb(3000, 1);
continue; continue;
} }
*/
exitHandler(); exitHandler();
} // if } // if
...@@ -409,9 +408,17 @@ void BackupRestore::cback(int result, restore_callback_t *cb) ...@@ -409,9 +408,17 @@ void BackupRestore::cback(int result, restore_callback_t *cb)
*/ */
bool BackupRestore::errorHandler(restore_callback_t *cb) bool BackupRestore::errorHandler(restore_callback_t *cb)
{ {
NdbError error= cb->connection->getNdbError(); NdbError error;
m_ndb->closeTransaction(cb->connection); if(cb->connection)
cb->connection= 0; {
error= cb->connection->getNdbError();
m_ndb->closeTransaction(cb->connection);
cb->connection= 0;
}
else
{
error= m_ndb->getNdbError();
}
Uint32 sleepTime = 100 + cb->retries * 300; Uint32 sleepTime = 100 + cb->retries * 300;
...@@ -426,6 +433,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb) ...@@ -426,6 +433,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb)
break; break;
case NdbError::TemporaryError: case NdbError::TemporaryError:
err << "Temporary error: " << error << endl;
NdbSleep_MilliSleep(sleepTime); NdbSleep_MilliSleep(sleepTime);
return true; return true;
// RETRY // RETRY
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment