⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eventlogger.cpp

📁 mysql-5.0.22.tar.gz源码包
💻 CPP
📖 第 1 页 / 共 3 页
字号:
    const unsigned state = sd->code >> 16;    switch (code) {    case ArbitCode::LoseNodes:      BaseString::snprintf(m_text, m_text_len,			   "Arbitration check lost - less than 1/2 nodes left");      break;    case ArbitCode::WinNodes:      BaseString::snprintf(m_text, m_text_len,			   "Arbitration check won - all node groups and more than 1/2 nodes left");      break;    case ArbitCode::WinGroups:      BaseString::snprintf(m_text, m_text_len,			   "Arbitration check won - node group majority");      break;    case ArbitCode::LoseGroups:      BaseString::snprintf(m_text, m_text_len,			   "Arbitration check lost - missing node group");      break;    case ArbitCode::Partitioning:      BaseString::snprintf(m_text, m_text_len,			   "Network partitioning - arbitration required");      break;    case ArbitCode::WinChoose:      BaseString::snprintf(m_text, m_text_len,			   "Arbitration won - positive reply from node %u",			   sd->node);      break;    case ArbitCode::LoseChoose:      BaseString::snprintf(m_text, m_text_len,			   "Arbitration lost - negative reply from node %u",			   sd->node);      break;    case ArbitCode::LoseNorun:      BaseString::snprintf(m_text, m_text_len,			   "Network partitioning - no arbitrator available");      break;    case ArbitCode::LoseNocfg:      BaseString::snprintf(m_text, m_text_len,			   "Network partitioning - no arbitrator configured");      break;    default:      ArbitCode::getErrText(code, errText, sizeof(errText));      BaseString::snprintf(m_text, m_text_len,			   "Arbitration failure - %s [state=%u]",			   errText, state);      break;    }  }}void getTextGlobalCheckpointStarted(QQQQ) {  //-----------------------------------------------------------------------  // This event reports that a global checkpoint has been started and this  // node is the master of this global checkpoint.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Global checkpoint %u started", 		       theData[1]);}void getTextGlobalCheckpointCompleted(QQQQ) {  //-----------------------------------------------------------------------  // This event reports that a global checkpoint has been completed on this  // node and the node is the master of this global checkpoint.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Global checkpoint %u completed", 		       theData[1]);}void getTextLocalCheckpointStarted(QQQQ) {  //-----------------------------------------------------------------------  // This event reports that a local checkpoint has been started and this  // node is the master of this local checkpoint.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Local checkpoint %u started. "		       "Keep GCI = %u oldest restorable GCI = %u", 		       theData[1], 		       theData[2], 		       theData[3]);}void getTextLocalCheckpointCompleted(QQQQ) {  //-----------------------------------------------------------------------  // This event reports that a local checkpoint has been completed on this  // node and the node is the master of this local checkpoint.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Local checkpoint %u completed", 		       theData[1]);}void getTextTableCreated(QQQQ) {  //-----------------------------------------------------------------------  // This event reports that a table has been created.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Table with ID =  %u created", 		       theData[1]);}/* STRANGE */void getTextLCPStoppedInCalcKeepGci(QQQQ) {  if (theData[1] == 0)    BaseString::snprintf(m_text, m_text_len, 			 "Local Checkpoint stopped in CALCULATED_KEEP_GCI");}void getTextNR_CopyDict(QQQQ) {  //-----------------------------------------------------------------------  // REPORT Node Restart completed copy of dictionary information.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Node restart completed copy of dictionary information");}void getTextNR_CopyDistr(QQQQ) {  //-----------------------------------------------------------------------  // REPORT Node Restart completed copy of distribution information.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Node restart completed copy of distribution information");}void getTextNR_CopyFragsStarted(QQQQ) {  //-----------------------------------------------------------------------  // REPORT Node Restart is starting to copy the fragments.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Node restart starting to copy the fragments "		       "to Node %u", 		       theData[1]);}void getTextNR_CopyFragDone(QQQQ) {  //-----------------------------------------------------------------------  // REPORT Node Restart copied a fragment.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Table ID = %u, fragment ID = %u have been copied "		       "to Node %u", 		       theData[2], 		       theData[3], 		       theData[1]);}void getTextNR_CopyFragsCompleted(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Node restart completed copying the fragments "		       "to Node %u", 		       theData[1]);}void getTextLCPFragmentCompleted(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Table ID = %u, fragment ID = %u has completed LCP "		       "on Node %u maxGciStarted: %d maxGciCompleted: %d", 		       theData[2], 		       theData[3], 		       theData[1],		       theData[4],		       theData[5]);}void getTextTransReportCounters(QQQQ) {  // -------------------------------------------------------------------    // Report information about transaction activity once per 10 seconds.  // -------------------------------------------------------------------   BaseString::snprintf(m_text, m_text_len, 		       "Trans. Count = %u, Commit Count = %u, "		       "Read Count = %u, Simple Read Count = %u,\n"		       "Write Count = %u, AttrInfo Count = %u, "		       "Concurrent Operations = %u, Abort Count = %u\n"		       " Scans: %u Range scans: %u", 		       theData[1], 		       theData[2], 		       theData[3], 		       theData[4],		       theData[5], 		       theData[6], 		       theData[7], 		       theData[8],		       theData[9],		       theData[10]);}void getTextOperationReportCounters(QQQQ) {  BaseString::snprintf(m_text, m_text_len,		       "Operations=%u",		       theData[1]);}void getTextUndoLogBlocked(QQQQ) {  //-----------------------------------------------------------------------  // REPORT Undo Logging blocked due to buffer near to overflow.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "ACC Blocked %u and TUP Blocked %u times last second",		       theData[1],		       theData[2]);}void getTextTransporterError(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Transporter to node %d reported error 0x%x",		       theData[1],		       theData[2]);}void getTextTransporterWarning(QQQQ) {  getTextTransporterError(m_text, m_text_len, theData);}void getTextMissedHeartbeat(QQQQ) {  //-----------------------------------------------------------------------  // REPORT Undo Logging blocked due to buffer near to overflow.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Node %d missed heartbeat %d",		       theData[1],		       theData[2]);}void getTextDeadDueToHeartbeat(QQQQ) {  //-----------------------------------------------------------------------  // REPORT Undo Logging blocked due to buffer near to overflow.  //-----------------------------------------------------------------------  BaseString::snprintf(m_text, m_text_len, 		       "Node %d declared dead due to missed heartbeat",		       theData[1]);}void getTextJobStatistic(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Mean loop Counter in doJob last 8192 times = %u",		       theData[1]);}void getTextSendBytesStatistic(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Mean send size to Node = %d last 4096 sends = %u bytes",		       theData[1],		       theData[2]);}void getTextReceiveBytesStatistic(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Mean receive size to Node = %d last 4096 sends = %u bytes",		       theData[1],		       theData[2]);}void getTextSentHeartbeat(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Node Sent Heartbeat to node = %d",		       theData[1]);}void getTextCreateLogBytes(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Log part %u, log file %u, MB %u",		       theData[1],		       theData[2],		       theData[3]);}void getTextStartLog(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Log part %u, start MB %u, stop MB %u, last GCI, log exec %u",		       theData[1],		       theData[2],		       theData[3],		       theData[4]);}void getTextStartREDOLog(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Node: %d StartLog: [GCI Keep: %d LastCompleted: %d NewestRestorable: %d]",		       theData[1],		       theData[2],		       theData[3],		       theData[4]);}void getTextUNDORecordsExecuted(QQQQ) {  const char* line = "";  if (theData[1] == DBTUP){    line = "DBTUP";  }else if (theData[1] == DBACC){    line = "DBACC";  }      BaseString::snprintf(m_text, m_text_len, 		       " UNDO %s %d [%d %d %d %d %d %d %d %d %d]",		       line,		       theData[2],		       theData[3],		       theData[4],		       theData[5],		       theData[6],		       theData[7],		       theData[8],		       theData[9],		       theData[10],		       theData[11]);}void getTextInfoEvent(QQQQ) {  BaseString::snprintf(m_text, m_text_len, (char *)&theData[1]);}void getTextWarningEvent(QQQQ) {  BaseString::snprintf(m_text, m_text_len, (char *)&theData[1]);}void getTextGCP_TakeoverStarted(QQQQ) {  BaseString::snprintf(m_text, m_text_len, "GCP Take over started");}void getTextGCP_TakeoverCompleted(QQQQ) {  BaseString::snprintf(m_text, m_text_len, "GCP Take over completed");}void getTextLCP_TakeoverStarted(QQQQ) {  BaseString::snprintf(m_text, m_text_len, "LCP Take over started");}void getTextLCP_TakeoverCompleted(QQQQ) {  BaseString::snprintf(m_text, m_text_len,		       "LCP Take over completed (state = %d)", 		       theData[1]);}void getTextMemoryUsage(QQQQ) {  const int gth = theData[1];  const int size = theData[2];  const int used = theData[3];  const int total = theData[4];  const int block = theData[5];  const int percent = (used*100)/total;      BaseString::snprintf(m_text, m_text_len,		       "%s usage %s %d%s(%d %dK pages of total %d)",		       (block==DBACC ? "Index" : (block == DBTUP ?"Data":"<unknown>")),		       (gth == 0 ? "is" : (gth > 0 ? "increased to" : "decreased to")),		       percent, "%",		       used, size/1024, total		       );}void getTextBackupStarted(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Backup %d started from node %d", 		       theData[2], refToNode(theData[1]));}void getTextBackupFailedToStart(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Backup request from %d failed to start. Error: %d", 		       refToNode(theData[1]), theData[2]);}void getTextBackupCompleted(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Backup %u started from node %u completed\n" 		       " StartGCP: %u StopGCP: %u\n"		       " #Records: %u #LogRecords: %u\n"		       " Data: %u bytes Log: %u bytes",		       theData[2], refToNode(theData[1]),		       theData[3], theData[4], theData[6], theData[8],		       theData[5], theData[7]);}void getTextBackupAborted(QQQQ) {  BaseString::snprintf(m_text, m_text_len, 		       "Backup %d started from %d has been aborted. Error: %d",		       theData[2], 		       refToNode(theData[1]), 		       theData[3]);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -