Loading ndb/tools/restore/consumer.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ public: virtual void logEntry(const LogEntry &){} virtual void endOfLogEntrys(){} virtual bool finalize_table(const TableS &){return true;} virtual bool has_temp_error() {return false;} }; #endif ndb/tools/restore/consumer_restore.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,11 @@ BackupRestore::finalize_table(const TableS & table){ return ret; } bool BackupRestore::has_temp_error(){ return m_temp_error; } bool BackupRestore::table(const TableS & table){ if (!m_restore && !m_restore_meta) Loading Loading @@ -437,6 +442,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb) case NdbError::TemporaryError: err << "Temporary error: " << error << endl; m_temp_error = true; NdbSleep_MilliSleep(sleepTime); return true; // RETRY Loading ndb/tools/restore/consumer_restore.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public: m_parallelism = parallelism; m_callback = 0; m_free_callback = 0; m_temp_error = false; m_transactions = 0; m_cache.m_old_table = 0; } Loading @@ -60,6 +61,7 @@ public: virtual void logEntry(const LogEntry &); virtual void endOfLogEntrys(); virtual bool finalize_table(const TableS &); virtual bool has_temp_error(); void connectToMysql(); Ndb * m_ndb; bool m_restore; Loading @@ -72,6 +74,7 @@ public: restore_callback_t *m_callback; restore_callback_t *m_free_callback; bool m_temp_error; /** * m_new_table_ids[X] = Y; Loading ndb/tools/restore/restore_main.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -411,6 +411,17 @@ main(int argc, char** argv) } } } for(Uint32 i= 0; i < g_consumers.size(); i++) { if (g_consumers[i]->has_temp_error()) { clearConsumers(); ndbout_c("\nRestore successful, but encountered temporary error, " "please look at configuration."); return NDBT_ProgramExit(NDBT_TEMPORARY); } } clearConsumers(); return NDBT_ProgramExit(NDBT_OK); } // main Loading Loading
ndb/tools/restore/consumer.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ public: virtual void logEntry(const LogEntry &){} virtual void endOfLogEntrys(){} virtual bool finalize_table(const TableS &){return true;} virtual bool has_temp_error() {return false;} }; #endif
ndb/tools/restore/consumer_restore.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,11 @@ BackupRestore::finalize_table(const TableS & table){ return ret; } bool BackupRestore::has_temp_error(){ return m_temp_error; } bool BackupRestore::table(const TableS & table){ if (!m_restore && !m_restore_meta) Loading Loading @@ -437,6 +442,7 @@ bool BackupRestore::errorHandler(restore_callback_t *cb) case NdbError::TemporaryError: err << "Temporary error: " << error << endl; m_temp_error = true; NdbSleep_MilliSleep(sleepTime); return true; // RETRY Loading
ndb/tools/restore/consumer_restore.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public: m_parallelism = parallelism; m_callback = 0; m_free_callback = 0; m_temp_error = false; m_transactions = 0; m_cache.m_old_table = 0; } Loading @@ -60,6 +61,7 @@ public: virtual void logEntry(const LogEntry &); virtual void endOfLogEntrys(); virtual bool finalize_table(const TableS &); virtual bool has_temp_error(); void connectToMysql(); Ndb * m_ndb; bool m_restore; Loading @@ -72,6 +74,7 @@ public: restore_callback_t *m_callback; restore_callback_t *m_free_callback; bool m_temp_error; /** * m_new_table_ids[X] = Y; Loading
ndb/tools/restore/restore_main.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -411,6 +411,17 @@ main(int argc, char** argv) } } } for(Uint32 i= 0; i < g_consumers.size(); i++) { if (g_consumers[i]->has_temp_error()) { clearConsumers(); ndbout_c("\nRestore successful, but encountered temporary error, " "please look at configuration."); return NDBT_ProgramExit(NDBT_TEMPORARY); } } clearConsumers(); return NDBT_ProgramExit(NDBT_OK); } // main Loading