1 /* 2 Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License, version 2.0, 6 as published by the Free Software Foundation. 7 8 This program is also distributed with certain software (including 9 but not limited to OpenSSL) that is licensed under separate terms, 10 as designated in a particular file or component or in included license 11 documentation. The authors of MySQL hereby grant you an additional 12 permission to link the program and your derivative works with the 13 separately licensed software that they have included with MySQL. 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License, version 2.0, for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 */ 24 25 #ifndef DUMP_STATE_ORD_HPP 26 #define DUMP_STATE_ORD_HPP 27 28 #include "SignalData.hpp" 29 30 #define JAM_FILE_ID 137 31 32 33 /** 34 * DumpStateOrd is sent by the mgmtsrvr to CMVMI. 35 * CMVMI the redirect the signal to all blocks. 36 * 37 * The implementation of the DumpStateOrd should dump state information 38 * (typically using the infoEvent-function) 39 */ 40 class DumpStateOrd { 41 /** 42 * Sender/Reciver 43 */ 44 friend class Cmvmi; 45 46 /** 47 * Sender(s) 48 */ 49 friend class MgmtSrvr; 50 51 /** 52 * Reciver(s) 53 */ 54 friend class Dbacc; 55 friend class Dblqh; 56 friend class Dbtup; 57 friend class Dbtc; 58 friend class Ndbcntr; 59 friend class Qmgr; 60 friend class Dbdih; 61 friend class Dbdict; 62 friend class Ndbfs; 63 64 public: 65 enum DumpStateType { 66 /* any dumps above this value should go to one block only */ 67 OneBlockOnly = 100000, 68 69 _BackupMin = 100000, 70 BackupStatus = 100000, 71 BackupMinWriteSpeed32 = 100001, 72 BackupMaxWriteSpeed32 = 100002, 73 BackupMaxWriteSpeedOtherNodeRestart32 = 100003, 74 BackupMinWriteSpeed64 = 100004, 75 BackupMaxWriteSpeed64 = 100005, 76 BackupMaxWriteSpeedOtherNodeRestart64 = 100006, 77 _BackupMax = 100999, 78 79 _TCMin = 101000, 80 _TCMax = 101999, 81 82 _LQHMin = 102000, 83 LQHLogFileInitStatus = 102000, 84 _LQHMax = 102999, 85 86 _CMVMIMin = 103000, 87 SetSchedulerResponsiveness = 103000, 88 EnableEventLoggerDebug = 103001, 89 DisableEventLoggerDebug = 103002, 90 CmvmiRelayDumpStateOrd = 103003, 91 CmvmiDummySignal = 103004, 92 CmvmiSendDummySignal = 103005, 93 _CMVMIMax = 103099, 94 95 _THRMANMin = 104000, 96 SetSchedulerSpinTimerAll = 104000, 97 SetSchedulerSpinTimerThread = 104001, 98 SetAllowedSpinOverhead = 104002, 99 SetSpintimePerCall = 104003, 100 EnableAdaptiveSpinning = 104004, 101 _THRMANMax = 104999, 102 // 1 QMGR Dump information about phase 1 variables 103 // 13 CMVMI Dump signal counter 104 // 13 NDBCNTR Dump start phase information 105 // 13 NDBCNTR_REF Dump start phase information 106 CommitAckMarkersSize = 14, // TC+LQH Dump free size in commitAckMarkerP 107 CommitAckMarkersDump = 15, // TC+LQH Dump info in commitAckMarkerPool 108 DihDumpNodeRestartInfo = 16, // 16 DIH Dump node restart info 109 DihDumpNodeStatusInfo = 17,// 17 DIH Dump node status info 110 DihPrintFragmentation = 18,// 18 DIH Print fragmentation 111 DihPrintOneFragmentation = 19,// 18 DIH Print info about one fragmentation 112 // 19 NDBFS Fipple with O_SYNC, O_CREATE etc. 113 // 20-24 BACKUP 114 NdbcntrTestStopOnError = 25, 115 NdbcntrStopNodes = 70, 116 // 100-105 TUP and ACC 117 // 200-240 UTIL 118 // 300-305 TRIX 119 QmgrErr935 = 935, 120 NdbfsDumpFileStat = 400, 121 NdbfsDumpAllFiles = 401, 122 NdbfsDumpOpenFiles = 402, 123 NdbfsDumpIdleFiles = 403, 124 NdbfsDumpRequests = 406, 125 CmvmiSchedulerExecutionTimer = 502, 126 CmvmiRealtimeScheduler = 503, 127 CmvmiExecuteLockCPU = 504, 128 CmvmiMaintLockCPU = 505, 129 CmvmiSchedulerSpinTimer = 506, 130 TupSetTransientPoolMaxSize = 1214, 131 TupResetTransientPoolMaxSize = 1215, 132 // 1222-1225 DICT 133 DictDumpLockQueue = 1228, 134 DictDumpGetTabInfoQueue = 1229, 135 LqhDumpAllDefinedTabs = 1332, 136 LqhDumpNoLogPages = 1333, 137 LqhDumpOneScanRec = 2300, 138 LqhDumpAllScanRec = 2301, 139 LqhDumpAllActiveScanRec = 2302, 140 LqhDumpLcpState = 2303, 141 LqhSystemError = 2304, 142 LqhFailedHandlingGCP_SAVEREQ = 2305, 143 LqhDumpAllTcRec = 2306, 144 LqhDumpOneTcRec = 2307, 145 // 2308 is used 146 LqhDumpOneCopyTcRec = 2310, 147 LqhErrorInsert5042 = 2315, 148 LqhDumpPoolLevels = 2353, 149 LqhReportCopyInfo = 2354, 150 LqhKillAndSendToDead = 2355, 151 LqhSetTransientPoolMaxSize = 2356, 152 LqhResetTransientPoolMaxSize = 2357, 153 154 AccDumpOneScanRec = 2400, 155 AccDumpAllScanRec = 2401, 156 AccDumpAllActiveScanRec = 2402, 157 AccDumpOneOperationRec = 2403, 158 AccDumpNumOpRecs = 2404, 159 AccDumpFreeOpRecs = 2405, 160 AccDumpNotFreeOpRecs = 2406, 161 AccSetTransientPoolMaxSize = 2407, 162 AccResetTransientPoolMaxSize = 2408, 163 DumpPageMemory = 1000, // Acc & TUP 164 DumpPageMemoryOnFail = 1001, 165 TcDumpSetOfScanFragRec = 2500, 166 TcDumpOneScanFragRec = 2501, 167 TcDumpSetOfScanRec = 2502, 168 TcDumpOneScanRec = 2504, 169 TcDumpOneApiConnectRec = 2505, 170 TcSetTransactionTimeout = 2507, 171 TcSetApplTransactionTimeout = 2508, 172 TcStartDumpIndexOpCount = 2512, 173 TcDumpIndexOpCount = 2513, 174 TcDumpApiConnectRecSummary = 2514, 175 TcDumpSetOfApiConnectRec = 2515, 176 TcDumpOneTcConnectRec = 2516, 177 TcDumpSetOfTcConnectRec = 2517, 178 TcDumpPoolLevels = 2555, 179 TcSetTransientPoolMaxSize = 2556, 180 TcResetTransientPoolMaxSize = 2557, 181 CmvmiDumpConnections = 2600, 182 CmvmiDumpLongSignalMemory = 2601, 183 /** 184 * Sets the type of restart when the child process crashes due to error 185 * insert (see NdbRestartType). 186 */ 187 CmvmiSetRestartOnErrorInsert = 2602, 188 CmvmiTestLongSigWithDelay = 2603, 189 CmvmiDumpSubscriptions = 2604, /* note: done to respective outfile 190 to be able to debug if events 191 for some reason does not end up 192 in clusterlog */ 193 CmvmiTestLongSig = 2605, /* Long signal testing trigger */ 194 DumpEventLog = 2606, 195 196 CmvmiLongSignalMemorySnapshotStart = 2607, 197 CmvmiLongSignalMemorySnapshot = 2608, 198 CmvmiLongSignalMemorySnapshotCheck = 2609, 199 CmvmiSetKillerWatchdog = 2610, 200 CmvmiLongSignalMemorySnapshotCheck2 = 2611, 201 202 CmvmiShowLongSignalOwnership = 2612, /* Show owners of LSM */ 203 204 LCPContinue = 5900, 205 // 7000 DIH 206 // 7001 DIH 207 // 7002 DIH 208 // 7003 DIH 209 // 7004 DIH 210 // 7005 DIH 211 // 7006 DIH 212 // 7006 DIH 213 // 7007 DIH 214 // 7008 DIH 215 // 7009 DIH 216 // 7010 DIH 217 // 7011 DIH 218 // 7012 DIH 219 DihDumpLCPState= 7013, 220 DihDumpLCPMasterTakeOver = 7014, 221 // 7015 DIH 222 DihAllAllowNodeStart = 7016, 223 DihMinTimeBetweenLCP = 7017, 224 DihMaxTimeBetweenLCP = 7018, 225 // Check if blocks are done with handling the failure of another node. 226 DihTcSumaNodeFailCompleted = 7019, // DIH+TC+SUMA 227 // 7020 228 // 7021 229 // 7022 230 // 7023 231 /* 232 Checks whether add frag failure was cleaned up. 233 Should NOT be used while commands involving addFragReq 234 are being performed. 235 NB: This value is only intended for use in test cases. If used 236 interactively, it is likely to crash the node. It should therefore 237 *not* be described in end-user documentation. 238 */ 239 DihAddFragFailCleanedUp = 7024, 240 /** 241 * Allows GCP stop thresholds to be set 242 */ 243 DihSetGcpStopVals = 7026, 244 DihStallLcpStart = 7027, 245 DihDumpPageRecInfo = 7032, 246 DihFragmentsPerNode = 7033, 247 DihDisplayPauseState = 7034, 248 EnableUndoDelayDataWrite = 7080, // DIH+ACC+TUP 249 DihSetTimeBetweenGcp = 7090, 250 DihStartLcpImmediately = 7099, 251 DihSaveGcpCommitLag = 7100, 252 DihCheckGcpCommitLag = 7101, 253 // 8000 Suma 254 // 12000 Tux 255 TuxLogToFile = 12001, 256 TuxSetLogFlags = 12002, 257 TuxMetaDataJunk = 12009, 258 TuxSetTransientPoolMaxSize = 12010, 259 TuxResetTransientPoolMaxSize = 12011, 260 261 DumpTsman = 9800, 262 263 DumpLgman = 10000, 264 LgmanDumpUndoStateClusterLog = 10001, 265 LgmanDumpUndoStateLocalLog = 10002, 266 LgmanCheckCallbacksClear = 10003, 267 268 DumpPgman = 11000, 269 DumpBackup = 13000, 270 DumpBackupSetCompressed = 13001, 271 DumpBackupSetCompressedLCP = 13002, 272 BackupErrorInsert = 13003, 273 274 DumpDbinfo = 14000, 275 DbinfoListTables = 14001, 276 DbinfoListColumns = 14002, 277 DbinfoScanTable = 14003, 278 279 SchemaResourceSnapshot = 4000, // Save resource consumption 280 SchemaResourceCheckLeak = 4001, // check same as snapshot 281 282 TcResourceSnapshot = 2553, 283 TcResourceCheckLeak = 2554, 284 285 RestoreRates = 30000 286 }; 287 public: 288 289 Uint32 args[25]; // Generic argument 290 }; 291 292 293 #undef JAM_FILE_ID 294 295 #endif 296