--- a/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp 2009-11-10 08:29:09.000000000 +0100 +++ b/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp 2009-12-07 09:42:15.000000000 +0100 @@ -94,6 +94,7 @@ ApiStart = 31, // arbitrator thread started ApiFail = 32, // arbitrator died ApiExit = 33, // arbitrator reported it will exit + ApiReport = 34, // arbitrator show ye self // arbitration result LoseNodes = 41, // lose on ndb node count --- a/storage/ndb/src/common/debugger/EventLogger.cpp 2009-11-10 08:29:14.000000000 +0100 +++ b/storage/ndb/src/common/debugger/EventLogger.cpp 2009-12-07 13:01:00.000000000 +0100 @@ -417,6 +417,15 @@ } } } + +void getTextArbitCurrent(QQQQ) { + //----------------------------------------------------------------------- + // This event reports the current Arbitrator. + //----------------------------------------------------------------------- + BaseString::snprintf(m_text, m_text_len, + "Current arbitrator node %d", theData[1]); +} + void getTextGlobalCheckpointStarted(QQQQ) { //----------------------------------------------------------------------- // This event reports that a global checkpoint has been started and this @@ -1157,6 +1166,7 @@ ROW(CreateLogBytes, LogLevel::llInfo, 11, Logger::LL_INFO ), ROW(InfoEvent, LogLevel::llInfo, 2, Logger::LL_INFO ), ROW(EventBufferStatus, LogLevel::llInfo, 7, Logger::LL_INFO ), + ROW(ArbitCurrent, LogLevel::llInfo, 2, Logger::LL_INFO ), //Single User ROW(SingleUser, LogLevel::llInfo, 7, Logger::LL_INFO ), --- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2009-11-10 08:29:24.000000000 +0100 +++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2009-12-07 12:13:53.000000000 +0100 @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -5661,6 +5662,13 @@ ndbout_c("disconnecting %u", signal->theData[1]); api_failed(signal, signal->theData[1]); } + + if (signal->theData[0] == DumpStateOrd::DumpArbitrator) + { + signal->theData[0] = NDB_LE_ArbitCurrent; + signal->theData[1] = arbitRec.node; + sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); + } }//Qmgr::execDUMP_STATE_ORD() --- a/storage/ndb/src/mgmapi/ndb_logevent.cpp 2009-11-10 08:29:30.000000000 +0100 +++ b/storage/ndb/src/mgmapi/ndb_logevent.cpp 2009-12-07 13:11:02.000000000 +0100 @@ -309,6 +309,9 @@ ROW( EventBufferStatus, "latest_gci_l", 6, latest_gci_l), ROW( EventBufferStatus, "latest_gci_h", 7, latest_gci_h), + // Current Arbitrator + ROW( ArbitCurrent, "arbit_node", 1, arbit_node), + // Backup ROW_FN( BackupStarted, "starting_node", 1, starting_node, ref_to_node), ROW( BackupStarted, "backup_id", 2, backup_id), --- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp 2009-11-10 08:29:31.000000000 +0100 +++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp 2009-12-07 13:14:18.000000000 +0100 @@ -896,6 +896,13 @@ Q(pages_used), Q(page_size_kb)/1024, Q(pages_total)); break; } +#undef EVENT +#define EVENT ArbitCurrent + case NDB_LE_ArbitCurrent: + { + ndbout_c("Node %u: Current Arbitrator is %d\n", R, Q(arbit_node)); + break; + } /** * default nothing to print */ @@ -920,6 +927,7 @@ int filter[] = { 15, NDB_MGM_EVENT_CATEGORY_BACKUP, 1, NDB_MGM_EVENT_CATEGORY_STARTUP, 5, NDB_MGM_EVENT_CATEGORY_STATISTIC, + 7, NDB_MGM_EVENT_CATEGORY_INFO, 0 }; NdbLogEventHandle log_handle= NULL; @@ -2452,6 +2460,8 @@ NDB_LE_BackupStatus, 100000 } ,{ "MemoryUsage", "Report memory usage of respective node", NDB_LE_MemoryUsage, 1000 } + ,{ "Arbitrator", "Report current arbitrator", + NDB_LE_ArbitCurrent, 2599 } }; static unsigned n_report_cmds =