summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2005-06-13 09:09:50 +0200
committerunknown <joreland@mysql.com>2005-06-13 09:09:50 +0200
commit06ab901376e7193b65fe9b5edc666876049d97c4 (patch)
tree2a134b4a7953a6b7ac7b44342ef258a4373d8dbc /ndb
parent05b341943a37918fd5448bcb2e924982e7f1b5f0 (diff)
downloadmariadb-git-06ab901376e7193b65fe9b5edc666876049d97c4.tar.gz
bug#10294 - ndb restore with #concurrent transactions < parallelism
Enable retry on startTransaction ndb/tools/restore/consumer_restore.cpp: Enable retry on startTransaction==NULL
Diffstat (limited to 'ndb')
-rw-r--r--ndb/tools/restore/consumer_restore.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/ndb/tools/restore/consumer_restore.cpp b/ndb/tools/restore/consumer_restore.cpp
index 9d161773bd2..d782a561e6a 100644
--- a/ndb/tools/restore/consumer_restore.cpp
+++ b/ndb/tools/restore/consumer_restore.cpp
@@ -288,12 +288,11 @@ void BackupRestore::tuple_a(restore_callback_t *cb)
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 @@ void BackupRestore::cback(int result, restore_callback_t *cb)
*/
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 @@ bool BackupRestore::errorHandler(restore_callback_t *cb)
break;
case NdbError::TemporaryError:
+ err << "Temporary error: " << error << endl;
NdbSleep_MilliSleep(sleepTime);
return true;
// RETRY