22 #include <ndb_limits.h>
23 #include <SimulatedBlock.hpp>
24 #include <SectionReader.hpp>
27 #include <DLFifoList.hpp>
28 #include <DLHashTable.hpp>
30 #include <NodeBitmask.hpp>
31 #include <signaldata/LCP.hpp>
32 #include <signaldata/LqhTransConf.hpp>
33 #include <signaldata/CreateTab.hpp>
34 #include <signaldata/LqhFrag.hpp>
35 #include <signaldata/FsOpenReq.hpp>
36 #include <signaldata/DropTab.hpp>
39 #include "../dbtup/Dbtup.hpp"
50 #define ZCOPY_CLOSING 0
51 #define ZCOPY_ONGOING 1
52 #define ZCOPY_ACTIVATION 2
63 #define ZSR_NO_PHASE_STARTED 0
64 #define ZSR_PHASE1_COMPLETED 1
65 #define ZSR_PHASE2_COMPLETED 2
66 #define ZSR_BOTH_PHASES_STARTED 3
75 #define ZREAD_AHEAD_SIZE 8
79 #define ZPAGE_HEADER_SIZE 32
80 #define ZPAGE_SIZE 8192
81 #define ZPAGES_IN_MBYTE 32
82 #define ZTWOLOG_NO_PAGES_IN_MBYTE 5
83 #define ZTWOLOG_PAGE_SIZE 13
84 #define ZMAX_MM_BUFFER_SIZE 32 // Main memory window during log execution
86 #define ZMAX_PAGES_WRITTEN 8 // Max pages before writing to disk (=> config)
87 #define ZMIN_READ_BUFFER_SIZE 2 // Minimum number of pages to execute log
88 #define ZMIN_LOG_PAGES_OPERATION 10 // Minimum no of pages before stopping
90 #define ZPOS_CHECKSUM 0
91 #define ZPOS_LOG_LAP 1
92 #define ZPOS_MAX_GCI_COMPLETED 2
93 #define ZPOS_MAX_GCI_STARTED 3
96 #define ZPOS_VERSION 6
97 #define ZPOS_NO_LOG_FILES 7
98 #define ZCURR_PAGE_INDEX 8
99 #define ZLAST_LOG_PREP_REF 10
100 #define ZPOS_DIRTY 11
102 #define ZPOS_LOG_TIMER 12
103 #define ZPOS_PAGE_I 13
104 #define ZPOS_PLACE_WRITTEN_FROM 14
105 #define ZPOS_PAGE_NO 15
106 #define ZPOS_PAGE_FILE_NO 16
107 #define ZPOS_WORD_WRITTEN 17
108 #define ZPOS_IN_WRITING 18
109 #define ZPOS_PREV_PAGE_NO 19
110 #define ZPOS_IN_FREE_LIST 20
115 #define ZPRIMARY_NODE 0
116 #define ZBACKUP_NODE 1
117 #define ZSTANDBY_NODE 2
123 #define ZVAR_NO_LOG_PAGE_WORD 1
124 #define ZLIST_OF_PAIRS 0
125 #define ZLIST_OF_PAIRS_SYNCH 16
126 #define ZARRAY_OF_PAGES 1
127 #define ZLIST_OF_MEM_PAGES 2
128 #define ZLIST_OF_MEM_PAGES_SYNCH 18
129 #define ZCLOSE_NO_DELETE 0
130 #define ZCLOSE_DELETE 1
146 #define ZFD_HEADER_SIZE 3
147 #define ZFD_MBYTE_SIZE 3
148 #define ZLOG_HEAD_SIZE 8
149 #define ZNEXT_LOG_SIZE 2
150 #define ZABORT_LOG_SIZE 3
151 #define ZCOMMIT_LOG_SIZE 9
152 #define ZCOMPLETED_GCI_LOG_SIZE 2
157 #define ZNEW_PREP_OP_TYPE 0
158 #define ZPREP_OP_TYPE 1
159 #define ZCOMMIT_TYPE 2
160 #define ZABORT_TYPE 3
162 #define ZFRAG_SPLIT_TYPE 5
163 #define ZNEXT_LOG_RECORD_TYPE 6
164 #define ZNEXT_MBYTE_TYPE 7
165 #define ZCOMPLETED_GCI_TYPE 8
166 #define ZINVALID_COMMIT_TYPE 9
171 #define ZPOS_LOG_TYPE 0
173 #define ZPOS_FILE_NO 2
178 #define ZPOS_HASH_VALUE 2
179 #define ZPOS_SCHEMA_VERSION 3
180 #define ZPOS_TRANS_TICKET 4
181 #define ZPOS_OP_TYPE 5
182 #define ZPOS_NO_ATTRINFO 6
183 #define ZPOS_NO_KEYINFO 7
187 #define ZPOS_COMMIT_TRANSID1 1
188 #define ZPOS_COMMIT_TRANSID2 2
189 #define ZPOS_COMMIT_GCI 3
190 #define ZPOS_COMMIT_TABLE_REF 4
191 #define ZPOS_COMMIT_FRAGID 5
192 #define ZPOS_COMMIT_FILE_NO 6
193 #define ZPOS_COMMIT_START_PAGE_NO 7
194 #define ZPOS_COMMIT_START_PAGE_INDEX 8
195 #define ZPOS_COMMIT_STOP_PAGE_NO 9
199 #define ZPOS_ABORT_TRANSID1 1
200 #define ZPOS_ABORT_TRANSID2 2
204 #define ZPOS_COMPLETED_GCI 1
208 #define ZPOS_NEW_PREP_FILE_NO 8
209 #define ZPOS_NEW_PREP_PAGE_REF 9
211 #define ZLAST_WRITE_IN_FILE 1
212 #define ZENFORCE_WRITE 2
222 #define ZLOG_LQHKEYREQ 0
223 #define ZPACK_LQHKEYREQ 1
224 #define ZSEND_ATTRINFO 2
225 #define ZSR_GCI_LIMITS 3
226 #define ZSR_LOG_LIMITS 4
227 #define ZSEND_EXEC_CONF 5
229 #define ZSR_FOURTH_COMP 7
230 #define ZINIT_FOURTH 8
231 #define ZTIME_SUPERVISION 9
232 #define ZSR_PHASE3_START 10
233 #define ZLQH_TRANS_NEXT 11
234 #define ZLQH_RELEASE_AT_NODE_FAILURE 12
235 #define ZSCAN_TC_CONNECT 13
236 #define ZINITIALISE_RECORDS 14
237 #define ZINIT_GCP_REC 15
238 #define ZCHECK_LCP_STOP_BLOCKED 17
239 #define ZSCAN_MARKERS 18
240 #define ZOPERATION_EVENT_REP 19
241 #define ZDROP_TABLE_WAIT_USAGE 20
242 #define ZENABLE_EXPAND_CHECK 21
243 #define ZRETRY_TCKEYREF 22
244 #define ZWAIT_REORG_SUMA_FILTER_ENABLED 23
245 #define ZREBUILD_ORDERED_INDEXES 24
246 #define ZWAIT_READONLY 25
253 #define ZEXEC_SR_COMPLETED 2
262 #define ZLAST_START_PHASE 255
263 #define ZSTART_PHASE1 1
264 #define ZSTART_PHASE2 2
265 #define ZSTART_PHASE3 3
266 #define ZSTART_PHASE4 4
267 #define ZSTART_PHASE6 6
271 #define ZSTORED_PROC_SCAN 0
272 #define ZSTORED_PROC_COPY 2
273 #define ZDELETE_STORED_PROC_ID 3
274 #define ZWRITE_LOCK 1
275 #define ZSCAN_FRAG_CLOSED 2
279 #define ZNOT_FOUND 1 // Not an error code, a return value
280 #define ZNO_FREE_LQH_CONNECTION 414
281 #define ZGET_DATAREC_ERROR 418
282 #define ZGET_ATTRINBUF_ERROR 419
283 #define ZNO_FREE_FRAGMENTREC 460 // Insert new fragment error code
284 #define ZTAB_FILE_SIZE 464 // Insert new fragment error code + Start kernel
285 #define ZNO_ADD_FRAGREC 465 // Insert new fragment error code
289 #define ZTAIL_PROBLEM_IN_LOG_ERROR 410
290 #define ZGCI_TOO_LOW_ERROR 429 // GCP_SAVEREF error code
291 #define ZTAB_STATE_ERROR 474 // Insert new fragment error code
292 #define ZTOO_NEW_GCI_ERROR 479 // LCP Start error
297 #define ZNO_FREE_FRAG_SCAN_REC_ERROR 490 // SCAN_FRAGREF error code
298 #define ZCOPY_NO_FRAGMENT_ERROR 491 // COPY_FRAGREF error code
299 #define ZTAKE_OVER_ERROR 499
300 #define ZCOPY_NODE_ERROR 1204
301 #define ZTOO_MANY_COPY_ACTIVE_ERROR 1208 // COPY_FRAG and COPY_ACTIVEREF code
302 #define ZCOPY_ACTIVE_ERROR 1210 // COPY_ACTIVEREF error code
303 #define ZNO_TC_CONNECT_ERROR 1217 // Simple Read + SCAN
304 #define ZTRANSPORTER_OVERLOADED_ERROR 1218
309 #define ZFILE_CHANGE_PROBLEM_IN_LOG_ERROR 1220
310 #define ZTEMPORARY_REDO_LOG_FAILURE 1221
311 #define ZNO_FREE_MARKER_RECORDS_ERROR 1222
312 #define ZNODE_SHUTDOWN_IN_PROGESS 1223
313 #define ZTOO_MANY_FRAGMENTS 1224
314 #define ZTABLE_NOT_DEFINED 1225
315 #define ZDROP_TABLE_IN_PROGRESS 1226
316 #define ZINVALID_SCHEMA_VERSION 1227
317 #define ZTABLE_READ_ONLY 1233
318 #define ZREDO_IO_PROBLEM 1234
323 #define ZNODE_FAILURE_ERROR 400
324 #define ZBAD_UNLOCK_STATE 416
325 #define ZBAD_OP_REF 417
329 #define ZNO_TUPLE_FOUND 626
330 #define ZTUPLE_ALREADY_EXIST 630
334 #define ZSEARCH_CONDITION_FALSE 899
335 #define ZUSER_ERROR_CODE_LIMIT 6000
420 LCP_CLOSE_STARTED = 2,
421 ACC_LCP_CLOSE_COMPLETED = 3,
422 TUP_LCP_CLOSE_COMPLETED = 4
425 enum ExecUndoLogState {
441 AddFragStatus addfragStatus;
443 UintR nextAddfragrec;
454 Uint16 addfragErrorCode;
455 Uint16 attrSentToTup;
457 Uint16 totalAttrReceived;
458 Uint16 fragCopyCreation;
459 Uint16 defValNextPos;
460 Uint32 defValSectionI;
468 WAIT_STORED_PROC_COPY = 1,
469 WAIT_STORED_PROC_SCAN = 2,
470 WAIT_NEXT_SCAN_COPY = 3,
472 WAIT_DELETE_STORED_PROC_ID_SCAN = 5,
473 WAIT_DELETE_STORED_PROC_ID_COPY = 6,
476 WAIT_SCAN_NEXTREQ = 10,
477 WAIT_CLOSE_SCAN = 12,
478 WAIT_CLOSE_COPY = 13,
479 WAIT_RELEASE_LOCK = 14,
480 WAIT_TUPKEY_COPY = 15,
481 WAIT_LQHKEY_COPY = 16,
498 STATIC_CONST( MaxScanAccSegments= (
499 (MAX_PARALLEL_OP_PER_SCAN + SectionSegment::DataLength - 1) /
500 SectionSegment::DataLength) + 1);
502 UintR scan_acc_op_ptr[ MaxScanAccSegments ];
503 Uint32 scan_acc_index;
504 Uint32 scan_acc_segments;
508 Uint32 m_max_batch_size_rows;
509 Uint32 m_max_batch_size_bytes;
511 Uint32 m_curr_batch_size_rows;
512 Uint32 m_curr_batch_size_bytes;
514 bool check_scan_batch_completed()
const;
527 Uint32 hashValue()
const {
533 UintR scanErrorCounter;
534 UintR scanSchemaVersion;
535 Uint32 scanTcWaiting;
542 UintR scanStoredProcId;
546 BlockReference scanApiBlockref;
548 Uint16 scanReleaseCounter;
552 BlockReference scanBlockref;
554 Uint8 scanCompletedStatus;
563 Uint8 scanKeyinfoFlag;
701 Uint16 srLqhLognode[4];
741 Uint8 m_copy_started_state;
944 UintR noOfPackedWordsLqh;
945 UintR packedWordsLqh[30];
946 UintR noOfPackedWordsTc;
947 UintR packedWordsTc[29];
948 BlockReference hostLqhBlockRef;
949 BlockReference hostTcBlockRef;
964 WAIT_TUP_PREPLCP = 1,
967 ACC_WAIT_STARTED = 4,
970 TUP_WAIT_STARTED = 7,
975 SR_ACC_COMPLETED = 12,
976 SR_TUP_COMPLETED = 13
978 LcpLocstate lcpLocstate;
998 LCP_WAIT_TUP_PREPLCP = 4,
999 LCP_WAIT_HOLDOPS = 5,
1001 LCP_BLOCKED_COMP = 8,
1002 LCP_SR_WAIT_FRAGID = 9,
1003 LCP_SR_STARTED = 10,
1004 LCP_SR_COMPLETED = 11
1008 bool firstFragmentFlag;
1009 bool lastFragmentFlag;
1024 Uint32 m_outstanding;
1030 STATIC_CONST( SAMPLE_TIME = 128 );
1031 STATIC_CONST( SLIDING_WINDOW_LEN = 1024 );
1032 STATIC_CONST( SLIDING_WINDOW_HISTORY_LEN = 8 );
1034 void init(Uint32 partNo);
1035 Uint32 m_log_part_no;
1036 Uint32 m_current_time;
1042 Uint32 m_save_written_bytes[SLIDING_WINDOW_HISTORY_LEN];
1043 Uint32 m_save_elapsed_millis[SLIDING_WINDOW_HISTORY_LEN];
1049 Uint32 m_curr_elapsed_millis;
1071 int tick(Uint32 now, Uint32 maxlag, Uint32 maxlag_cnt);
1072 void send_io(Uint32 bytes);
1073 void complete_io(Uint32 bytes);
1112 SR_THIRD_PHASE_COMPLETED = 5,
1115 SR_FOURTH_PHASE_COMPLETED = 7
1117 enum WaitWriteGciLog {
1123 LES_SEARCH_STOP = 1,
1124 LES_SEARCH_START = 2,
1126 LES_EXEC_LOG_NEW_MBYTE = 4,
1127 LES_EXEC_LOG_NEW_FILE = 5,
1128 LES_EXEC_LOGREC_FROM_FILE = 6,
1129 LES_EXEC_LOG_COMPLETED = 7,
1130 LES_WAIT_READ_EXEC_SR_NEW_MBYTE = 8,
1131 LES_WAIT_READ_EXEC_SR = 9,
1132 LES_EXEC_LOG_INVALIDATE = 10
1202 void init() { firstElement = lastElement = RNIL;}
1203 bool isEmpty()
const {
return firstElement == RNIL; }
1204 Uint32 firstElement;
1263 P_TAIL_PROBLEM = 0x1,
1264 P_REDO_IO_PROBLEM = 0x2,
1265 P_FILE_CHANGE_PROBLEM = 0x4
1267 Uint32 m_log_problems;
1394 Uint16 logTailMbyte;
1444 enum FileChangeState {
1446 BOTH_WRITES_ONGOING = 1,
1447 LAST_WRITE_ONGOING = 2,
1448 FIRST_WRITE_ONGOING = 3,
1449 WRITE_PAGE_ZERO_ONGOING = 4
1466 OPEN_EXEC_SR_NEW_MBYTE = 7,
1467 OPEN_SR_FOURTH_PHASE = 8,
1468 OPEN_SR_FOURTH_NEXT = 9,
1469 OPEN_SR_FOURTH_ZERO = 10,
1480 CLOSING_EXEC_SR_COMPLETED = 16,
1483 CLOSING_EXEC_LOG = 18,
1486 OPEN_SR_READ_INVALIDATE_PAGES = 21,
1487 CLOSE_SR_READ_INVALIDATE_PAGES = 22,
1488 OPEN_SR_WRITE_INVALIDATE_PAGES = 23,
1489 CLOSE_SR_WRITE_INVALIDATE_PAGES = 24,
1490 OPEN_SR_READ_INVALIDATE_SEARCH_FILES = 25,
1491 CLOSE_SR_READ_INVALIDATE_SEARCH_FILES = 26,
1492 CLOSE_SR_READ_INVALIDATE_SEARCH_LAST_FILE = 27
1493 #ifndef NO_REDO_OPEN_FILE_CACHE
1494 ,OPEN_EXEC_LOG_CACHED = 28
1495 ,CLOSING_EXEC_LOG_CACHED = 29
1626 #ifndef NO_REDO_OPEN_FILE_CACHE
1647 WRITE_INIT_MBYTE = 4,
1656 READ_SR_LAST_MBYTE = 9,
1659 READ_SR_FOURTH_PHASE = 12,
1660 READ_SR_FOURTH_ZERO = 13,
1661 FIRST_PAGE_WRITE_IN_LOGFILE = 14,
1662 LAST_WRITE_IN_FILE = 15,
1663 WRITE_PAGE_ZERO = 16,
1666 READ_SR_INVALIDATE_PAGES = 18,
1667 WRITE_SR_INVALIDATE_PAGES = 19,
1668 WRITE_SR_INVALIDATE_PAGES_UPDATE_PAGE0 = 20
1669 ,READ_SR_INVALIDATE_SEARCH_FILES = 21
1915 ADD_TABLE_ONGOING = 2,
1916 PREP_DROP_TABLE_DONE = 3,
1917 DROP_TABLE_WAIT_USAGE = 4,
1918 DROP_TABLE_WAIT_DONE = 5,
1922 ,TABLE_READ_ONLY = 9
1925 UintR fragrec[MAX_FRAG_PER_NODE];
1926 Uint16 fragid[MAX_FRAG_PER_NODE];
1935 Uint16 primaryTableId;
1936 Uint32 schemaVersion;
1949 enum LogWriteState {
1952 NOT_WRITTEN_WAIT = 2,
1963 enum TransactionState {
1970 WAIT_TUPKEYINFO = 2,
1976 LOG_COMMIT_WRITTEN_WAIT_SIGNAL = 8,
1977 LOG_COMMIT_QUEUED_WAIT_SIGNAL = 9,
1982 COMMIT_STOPPED = 10,
1983 LOG_COMMIT_QUEUED = 11,
1986 WAIT_TUP_COMMIT= 35,
1991 WAIT_ACC_ABORT = 14,
1994 WAIT_AI_AFTER_ABORT = 17,
1995 LOG_ABORT_QUEUED = 18,
1996 WAIT_TUP_TO_ABORT = 19,
2002 SCAN_STATE_USED = 21,
2003 SCAN_FIRST_STOPPED = 22,
2004 SCAN_CHECK_STOPPED = 23,
2006 SCAN_RELEASE_STOPPED = 25,
2007 SCAN_CLOSE_STOPPED = 26,
2008 COPY_CLOSE_STOPPED = 27,
2009 COPY_FIRST_STOPPED = 28,
2014 TC_NOT_CONNECTED = 32,
2015 PREPARED_RECEIVED_COMMIT = 33,
2016 LOG_COMMIT_WRITTEN = 34
2024 ConnectState connectState;
2025 UintR copyCountWords;
2027 Uint32 attrInfoIVal;
2029 AbortState abortState;
2030 UintR accConnectrec;
2032 UintR clientConnectrec;
2048 UintR logStartFileNo;
2049 LogWriteState logWriteState;
2052 UintR nextTcLogQueue;
2054 UintR nextTcConnectrec;
2061 UintR schemaVersion;
2063 UintR simpleTcConnect;
2071 UintR tupConnectrec;
2073 TransactionState transactionState;
2074 BlockReference applRef;
2075 BlockReference clientBlockref;
2077 BlockReference reqBlockref;
2078 BlockReference tcBlockref;
2079 BlockReference tcAccBlockref;
2080 BlockReference tcTuxBlockref;
2081 BlockReference tcTupBlockref;
2082 Uint32 commitAckMarker;
2084 Uint32 m_scan_curr_range_no;
2085 UintR noFiredTriggers;
2087 Uint32 m_corrFactorLo;
2088 Uint32 m_corrFactorHi;
2091 Uint16 logStartPageIndex;
2092 Uint16 logStartPageNo;
2093 Uint16 logStopPageNo;
2097 Uint16 nodeAfterNext[3];
2103 Uint8 lastReplicaNo;
2105 Uint8 nextSeqNoReplica;
2110 Uint8 reclenAiLqhkey;
2113 Uint8 tcNodeFailrec;
2117 Uint8 m_fire_trig_pass;
2120 OP_SAVEATTRINFO = 0x2,
2121 OP_SCANKEYINFOPOSSAVED = 0x4,
2122 OP_DEFERRED_CONSTRAINTS = 0x8
2125 Uint32 m_log_part_ptr_i;
2131 Uint32 m_page_id[2];
2146 TcFailStatus tcFailStatus;
2148 BlockReference lastNewTcBlockref;
2149 BlockReference newTcBlockref;
2156 Uint32 startPageIndex;
2161 Uint32 totalLogFiles;
2162 Uint32 logFileInitDone;
2163 Uint32 totallogMBytes;
2164 Uint32 logMBytesInitDone;
2166 Uint32 m_startup_report_frequency;
2167 NDB_TICKS m_next_report_time;
2173 void receive_keyinfo(
Signal*, Uint32 * data, Uint32 len);
2174 void receive_attrinfo(
Signal*, Uint32 * data, Uint32 len);
2177 BLOCK_DEFINES(
Dblqh);
2179 void execPACKED_SIGNAL(
Signal* signal);
2180 void execDEBUG_SIG(
Signal* signal);
2181 void execATTRINFO(
Signal* signal);
2182 void execKEYINFO(
Signal* signal);
2183 void execLQHKEYREQ(
Signal* signal);
2184 void execLQHKEYREF(
Signal* signal);
2185 void execCOMMIT(
Signal* signal);
2186 void execCOMPLETE(
Signal* signal);
2187 void execLQHKEYCONF(
Signal* signal);
2188 void execTESTSIG(
Signal* signal);
2189 void execLQH_RESTART_OP(
Signal* signal);
2190 void execCONTINUEB(
Signal* signal);
2191 void execSTART_RECREQ(
Signal* signal);
2192 void execSTART_RECCONF(
Signal* signal);
2193 void execEXEC_FRAGREQ(
Signal* signal);
2194 void execEXEC_FRAGCONF(
Signal* signal);
2195 void execEXEC_FRAGREF(
Signal* signal);
2196 void execSTART_EXEC_SR(
Signal* signal);
2197 void execEXEC_SRREQ(
Signal* signal);
2198 void execEXEC_SRCONF(
Signal* signal);
2199 void execREAD_PSEUDO_REQ(
Signal* signal);
2200 void execSIGNAL_DROPPED_REP(
Signal* signal);
2202 void execDBINFO_SCANREQ(
Signal* signal);
2203 void execDUMP_STATE_ORD(
Signal* signal);
2204 void execACC_ABORTCONF(
Signal* signal);
2205 void execNODE_FAILREP(
Signal* signal);
2206 void execCHECK_LCP_STOP(
Signal* signal);
2207 void execSEND_PACKED(
Signal* signal);
2208 void execTUP_ATTRINFO(
Signal* signal);
2209 void execREAD_CONFIG_REQ(
Signal* signal);
2211 void execCREATE_TAB_REQ(
Signal* signal);
2212 void execCREATE_TAB_REF(
Signal* signal);
2213 void execCREATE_TAB_CONF(
Signal* signal);
2214 void execLQHADDATTREQ(
Signal* signal);
2215 void execTUP_ADD_ATTCONF(
Signal* signal);
2216 void execTUP_ADD_ATTRREF(
Signal* signal);
2218 void execLQHFRAGREQ(
Signal* signal);
2219 void execACCFRAGCONF(
Signal* signal);
2220 void execACCFRAGREF(
Signal* signal);
2221 void execTUPFRAGCONF(
Signal* signal);
2222 void execTUPFRAGREF(
Signal* signal);
2224 void execDROP_FRAG_REQ(
Signal*);
2225 void execDROP_FRAG_REF(
Signal*);
2226 void execDROP_FRAG_CONF(
Signal*);
2228 void execTAB_COMMITREQ(
Signal* signal);
2229 void execACCSEIZECONF(
Signal* signal);
2230 void execACCSEIZEREF(
Signal* signal);
2231 void execREAD_NODESCONF(
Signal* signal);
2232 void execREAD_NODESREF(
Signal* signal);
2233 void execSTTOR(
Signal* signal);
2234 void execNDB_STTOR(
Signal* signal);
2235 void execTUPSEIZECONF(
Signal* signal);
2236 void execTUPSEIZEREF(
Signal* signal);
2237 void execACCKEYCONF(
Signal* signal);
2238 void execACCKEYREF(
Signal* signal);
2239 void execTUPKEYCONF(
Signal* signal);
2240 void execTUPKEYREF(
Signal* signal);
2241 void execABORT(
Signal* signal);
2242 void execABORTREQ(
Signal* signal);
2243 void execCOMMITREQ(
Signal* signal);
2244 void execCOMPLETEREQ(
Signal* signal);
2245 void execMEMCHECKREQ(
Signal* signal);
2246 void execSCAN_FRAGREQ(
Signal* signal);
2247 void execSCAN_NEXTREQ(
Signal* signal);
2248 void execACC_SCANCONF(
Signal* signal);
2249 void execACC_SCANREF(
Signal* signal);
2250 void execNEXT_SCANCONF(
Signal* signal);
2251 void execNEXT_SCANREF(
Signal* signal);
2252 void execACC_TO_REF(
Signal* signal);
2253 void execSTORED_PROCCONF(
Signal* signal);
2254 void execSTORED_PROCREF(
Signal* signal);
2255 void execCOPY_FRAGREQ(
Signal* signal);
2256 void execCOPY_FRAGREF(
Signal* signal);
2257 void execCOPY_FRAGCONF(
Signal* signal);
2258 void execPREPARE_COPY_FRAG_REQ(
Signal* signal);
2259 void execUPDATE_FRAG_DIST_KEY_ORD(
Signal*);
2260 void execCOPY_ACTIVEREQ(
Signal* signal);
2261 void execCOPY_STATEREQ(
Signal* signal);
2262 void execLQH_TRANSREQ(
Signal* signal);
2263 void execTRANSID_AI(
Signal* signal);
2264 void execINCL_NODEREQ(
Signal* signal);
2266 void force_lcp(
Signal* signal);
2267 void execLCP_FRAG_ORD(
Signal* signal);
2268 void execEMPTY_LCP_REQ(
Signal* signal);
2270 void execSTART_FRAGREQ(
Signal* signal);
2271 void execSTART_RECREF(
Signal* signal);
2273 void execGCP_SAVEREQ(
Signal* signal);
2274 void execSUB_GCP_COMPLETE_REP(
Signal* signal);
2275 void execFSOPENREF(
Signal* signal);
2276 void execFSOPENCONF(
Signal* signal);
2277 void execFSCLOSECONF(
Signal* signal);
2278 void execFSWRITECONF(
Signal* signal);
2279 void execFSWRITEREF(
Signal* signal);
2280 void execFSREADCONF(
Signal* signal);
2281 void execFSREADREF(
Signal* signal);
2282 void execFSWRITEREQ(
Signal*);
2283 void execTIME_SIGNAL(
Signal* signal);
2284 void execFSSYNCCONF(
Signal* signal);
2286 void execALTER_TAB_REQ(
Signal* signal);
2287 void execALTER_TAB_CONF(
Signal* signal);
2289 void execCREATE_TRIG_IMPL_CONF(
Signal* signal);
2290 void execCREATE_TRIG_IMPL_REF(
Signal* signal);
2291 void execCREATE_TRIG_IMPL_REQ(
Signal* signal);
2293 void execDROP_TRIG_IMPL_CONF(
Signal* signal);
2294 void execDROP_TRIG_IMPL_REF(
Signal* signal);
2295 void execDROP_TRIG_IMPL_REQ(
Signal* signal);
2297 void execPREP_DROP_TAB_REQ(
Signal* signal);
2298 void execDROP_TAB_REQ(
Signal* signal);
2299 void execDROP_TAB_REF(
Signal*);
2300 void execDROP_TAB_CONF(
Signal*);
2303 void execLQH_ALLOCREQ(
Signal* signal);
2304 void execTUP_DEALLOCREQ(
Signal* signal);
2305 void execLQH_WRITELOG_REQ(
Signal* signal);
2307 void execTUXFRAGCONF(
Signal* signal);
2308 void execTUXFRAGREF(
Signal* signal);
2309 void execTUX_ADD_ATTRCONF(
Signal* signal);
2310 void execTUX_ADD_ATTRREF(
Signal* signal);
2312 void execBUILD_INDX_IMPL_REF(
Signal* signal);
2313 void execBUILD_INDX_IMPL_CONF(
Signal* signal);
2315 void execFIRE_TRIG_REQ(
Signal*);
2320 bool seize_acc_ptr_list(
ScanRecord*, Uint32, Uint32);
2322 Uint32 get_acc_ptr_from_scan_record(
ScanRecord*, Uint32,
bool);
2323 void set_acc_ptr_in_scan_record(
ScanRecord*, Uint32, Uint32);
2324 void i_get_acc_ptr(
ScanRecord*, Uint32*&, Uint32);
2326 void removeTable(Uint32 tableId);
2327 void sendLCP_COMPLETE_REP(
Signal* signal, Uint32 lcpId);
2328 void sendEMPTY_LCP_CONF(
Signal* signal,
bool idle);
2329 void sendLCP_FRAGIDREQ(
Signal* signal);
2333 void updatePackedList(
Signal* signal,
HostRecord * ahostptr, Uint16 hostId);
2334 void LQHKEY_abort(
Signal* signal,
int errortype);
2335 void LQHKEY_error(
Signal* signal,
int errortype);
2336 void nextRecordCopy(
Signal* signal);
2337 Uint32 calculateHash(Uint32 tableId,
const Uint32* src);
2338 void continueAfterCheckLcpStopBlocked(
Signal* signal);
2339 void checkLcpStopBlockedLab(
Signal* signal);
2340 void sendCommittedTc(
Signal* signal, BlockReference atcBlockref);
2341 void sendCompletedTc(
Signal* signal, BlockReference atcBlockref);
2342 void sendLqhkeyconfTc(
Signal* signal, BlockReference atcBlockref);
2343 void sendCommitLqh(
Signal* signal, BlockReference alqhBlockref);
2344 void sendCompleteLqh(
Signal* signal, BlockReference alqhBlockref);
2347 void cleanUp(
Signal* signal);
2348 void sendAttrinfoLoop(
Signal* signal);
2349 void sendAttrinfoSignal(
Signal* signal);
2350 void sendLqhAttrinfoSignal(
Signal* signal);
2351 void sendKeyinfoAcc(
Signal* signal, Uint32 pos);
2360 void finishScanrec(
Signal* signal);
2361 void releaseScanrec(
Signal* signal);
2362 void seizeScanrec(
Signal* signal);
2364 void sendTCKEYREF(
Signal*, Uint32 dst, Uint32 route, Uint32 cnt);
2365 void sendScanFragConf(
Signal* signal, Uint32 scanCompleted);
2366 void initCopyrec(
Signal* signal);
2367 void initCopyTc(
Signal* signal, Operation_t);
2368 void sendCopyActiveConf(
Signal* signal,Uint32 tableId);
2369 void checkLcpCompleted(
Signal* signal);
2370 void checkLcpHoldop(
Signal* signal);
2371 bool checkLcpStarted(
Signal* signal);
2372 void checkLcpTupprep(
Signal* signal);
2373 void getNextFragForLcp(
Signal* signal);
2374 void sendAccContOp(
Signal* signal);
2375 void sendStartLcp(
Signal* signal);
2376 void setLogTail(
Signal* signal, Uint32 keepGci);
2379 bool checkGcpCompleted(
Signal* signal, Uint32 pageWritten, Uint32 wordWritten);
2380 void initFsopenconf(
Signal* signal);
2381 void initFsrwconf(
Signal* signal,
bool write);
2382 void initLfo(
Signal* signal);
2383 void initLogfile(
Signal* signal, Uint32 fileNo);
2384 void initLogpage(
Signal* signal);
2386 void openLogfileInit(
Signal* signal);
2387 void openNextLogfile(
Signal* signal);
2388 void releaseLfo(
Signal* signal);
2389 void releaseLfoPages(
Signal* signal);
2390 void releaseLogpage(
Signal* signal);
2391 void seizeLfo(
Signal* signal);
2392 void seizeLogfile(
Signal* signal);
2393 void seizeLogpage(
Signal* signal);
2394 void writeFileDescriptor(
Signal* signal);
2395 void writeFileHeaderOpen(
Signal* signal, Uint32
type);
2396 void writeInitMbyte(
Signal* signal);
2397 void writeSinglePage(
Signal* signal, Uint32 pageNo,
2398 Uint32 wordWritten, Uint32 place,
2400 void buildLinkedLogPageList(
Signal* signal);
2401 void changeMbyte(
Signal* signal);
2402 Uint32 checkIfExecLog(
Signal* signal);
2403 void checkNewMbyte(
Signal* signal);
2404 void checkReadExecSr(
Signal* signal);
2405 void checkScanTcCompleted(
Signal* signal);
2407 void completedLogPage(
Signal* signal, Uint32 clpType, Uint32 place);
2410 void wait_reorg_suma_filter_enabled(
Signal*);
2412 void deleteFragrec(Uint32 fragId);
2413 void deleteTransidHash(
Signal* signal);
2414 void findLogfile(
Signal* signal,
2419 int findTransaction(UintR Transid1, UintR Transid2, UintR TcOprec, UintR hi);
2421 bool getFragmentrec(
Signal* signal, Uint32 fragId);
2422 void initialiseAddfragrec(
Signal* signal);
2423 void initialiseFragrec(
Signal* signal);
2424 void initialiseGcprec(
Signal* signal);
2425 void initialiseLcpRec(
Signal* signal);
2426 void initialiseLfo(
Signal* signal);
2427 void initialiseLogFile(
Signal* signal);
2428 void initialiseLogPage(
Signal* signal);
2429 void initialiseLogPart(
Signal* signal);
2430 void initialisePageRef(
Signal* signal);
2431 void initialiseScanrec(
Signal* signal);
2432 void initialiseTabrec(
Signal* signal);
2433 void initialiseTcrec(
Signal* signal);
2434 void initialiseTcNodeFailRec(
Signal* signal);
2435 void initFragrec(
Signal* signal,
2439 void initFragrecSr(
Signal* signal);
2440 void initGciInLogFileRec(
Signal* signal, Uint32 noFdDesc);
2441 void initLcpSr(
Signal* signal,
2447 void initLogpart(
Signal* signal);
2448 void initLogPointers(
Signal* signal);
2449 void initReqinfoExecSr(
Signal* signal);
2450 bool insertFragrec(
Signal* signal, Uint32 fragId);
2451 void linkFragQueue(
Signal* signal);
2453 void logNextStart(
Signal* signal);
2454 void moveToPageRef(
Signal* signal);
2455 void readAttrinfo(
Signal* signal);
2457 void readExecLog(
Signal* signal);
2458 void readExecSrNewMbyte(
Signal* signal);
2459 void readExecSr(
Signal* signal);
2460 void readKey(
Signal* signal);
2461 void readLogData(
Signal* signal, Uint32 noOfWords, Uint32& sectionIVal);
2462 void readLogHeader(
Signal* signal);
2463 Uint32 readLogword(
Signal* signal);
2464 Uint32 readLogwordExec(
Signal* signal);
2465 void readSinglePage(
Signal* signal, Uint32 pageNo);
2466 void releaseActiveCopy(
Signal* signal);
2467 void releaseAddfragrec(
Signal* signal);
2468 void releaseFragrec();
2469 void releaseOprec(
Signal* signal);
2470 void releasePageRef(
Signal* signal);
2471 void releaseMmPages(
Signal* signal);
2472 void releasePrPages(
Signal* signal);
2475 void releaseWaitQueue(
Signal* signal);
2476 void removeLogTcrec(
Signal* signal);
2477 void removePageRef(
Signal* signal);
2478 Uint32 returnExecLog(
Signal* signal);
2479 int saveAttrInfoInSection(
const Uint32* dataPtr, Uint32 len);
2480 void seizeAddfragrec(
Signal* signal);
2481 Uint32 seizeSegment();
2484 void seizeFragmentrec(
Signal* signal);
2485 void seizePageRef(
Signal* signal);
2487 void sendAborted(
Signal* signal);
2488 void sendLqhTransconf(
Signal* signal, LqhTransConf::OperationStatus);
2489 void sendTupkey(
Signal* signal);
2490 void startExecSr(
Signal* signal);
2491 void startNextExecSr(
Signal* signal);
2492 void startTimeSupervision(
Signal* signal);
2493 void stepAhead(
Signal* signal, Uint32 stepAheadWords);
2494 void systemError(
Signal* signal,
int line);
2495 void writeAbortLog(
Signal* signal);
2497 void writeCompletedGciLog(
Signal* signal);
2499 Uint32 pageNo, Uint32 wordWritten);
2500 void writeDirty(
Signal* signal, Uint32 place);
2501 void writeKey(
Signal* signal);
2502 void writeLogHeader(
Signal* signal);
2503 void writeLogWord(
Signal* signal, Uint32 data);
2504 void writeLogWords(
Signal* signal,
const Uint32* data, Uint32 len);
2505 void writeNextLog(
Signal* signal);
2506 void errorReport(
Signal* signal,
int place);
2507 void warningReport(
Signal* signal,
int place);
2508 void invalidateLogAfterLastGCI(
Signal *signal);
2509 Uint32 nextLogFilePtr(Uint32 logFilePtrI);
2510 void readFileInInvalidate(
Signal *signal,
int stepNext);
2511 void writeFileInInvalidate(
Signal *signal,
int stepPrev);
2514 void exitFromInvalidate(
Signal* signal);
2516 Uint32 handleLongTupKey(
Signal* signal, Uint32* dataPtr, Uint32 len);
2518 void rebuildOrderedIndexes(
Signal* signal, Uint32 tableId);
2521 void systemErrorLab(
Signal* signal,
int line);
2522 void initFourth(
Signal* signal);
2523 void packLqhkeyreqLab(
Signal* signal);
2524 void sendNdbSttorryLab(
Signal* signal);
2525 void execSrCompletedLab(
Signal* signal);
2526 void execLogRecord(
Signal* signal);
2527 void srPhase3Comp(
Signal* signal);
2528 void srLogLimits(
Signal* signal);
2529 void srGciLimits(
Signal* signal);
2530 void srPhase3Start(
Signal* signal);
2531 void checkStartCompletedLab(
Signal* signal);
2532 void continueAbortLab(
Signal* signal);
2533 void abortContinueAfterBlockedLab(
Signal* signal);
2534 void abortCommonLab(
Signal* signal);
2535 void localCommitLab(
Signal* signal);
2536 void abortErrorLab(
Signal* signal);
2537 void continueAfterReceivingAllAiLab(
Signal* signal);
2538 void abortStateHandlerLab(
Signal* signal);
2539 void writeAttrinfoLab(
Signal* signal);
2540 void scanAttrinfoLab(
Signal* signal, Uint32* dataPtr, Uint32 length);
2541 void abort_scan(
Signal* signal, Uint32 scan_ptr_i, Uint32 errcode);
2542 void localAbortStateHandlerLab(
Signal* signal);
2543 void logLqhkeyreqLab(
Signal* signal);
2544 void logLqhkeyreqLab_problems(
Signal* signal);
2546 void lqhAttrinfoLab(
Signal* signal, Uint32* dataPtr, Uint32 length);
2547 void rwConcludedAiLab(
Signal* signal);
2548 void aiStateErrorCheckLab(
Signal* signal, Uint32* dataPtr, Uint32 length);
2549 void takeOverErrorLab(
Signal* signal);
2550 void endgettupkeyLab(
Signal* signal);
2551 bool checkTransporterOverloaded(
Signal* signal,
2554 void noFreeRecordLab(
Signal* signal,
2557 void logLqhkeyrefLab(
Signal* signal);
2558 void closeCopyLab(
Signal* signal);
2559 void commitReplyLab(
Signal* signal);
2560 void completeUnusualLab(
Signal* signal);
2561 void completeTransNotLastLab(
Signal* signal);
2562 void completedLab(
Signal* signal);
2563 void copyCompletedLab(
Signal* signal);
2564 void completeLcpRoundLab(
Signal* signal, Uint32 lcpId);
2565 void continueAfterLogAbortWriteLab(
Signal* signal);
2566 void sendAttrinfoLab(
Signal* signal);
2567 void sendExecConf(
Signal* signal);
2568 void execSr(
Signal* signal);
2569 void srFourthComp(
Signal* signal);
2570 void timeSup(
Signal* signal);
2571 void closeCopyRequestLab(
Signal* signal);
2572 void closeScanRequestLab(
Signal* signal);
2573 void scanTcConnectLab(
Signal* signal, Uint32 startTcCon, Uint32 fragId);
2574 void initGcpRecLab(
Signal* signal);
2575 void prepareContinueAfterBlockedLab(
Signal* signal);
2576 void commitContinueAfterBlockedLab(
Signal* signal);
2577 void continueCopyAfterBlockedLab(
Signal* signal);
2578 void continueFirstCopyAfterBlockedLab(
Signal* signal);
2579 void continueFirstScanAfterBlockedLab(
Signal* signal);
2580 void continueScanAfterBlockedLab(
Signal* signal);
2581 void continueScanReleaseAfterBlockedLab(
Signal* signal);
2582 void continueCloseScanAfterBlockedLab(
Signal* signal);
2583 void continueCloseCopyAfterBlockedLab(
Signal* signal);
2584 void sendExecFragRefLab(
Signal* signal);
2586 void abortAddFragOps(
Signal* signal);
2587 void rwConcludedLab(
Signal* signal);
2588 void sendsttorryLab(
Signal* signal);
2589 void initialiseRecordsLab(
Signal* signal, Uint32 data, Uint32, Uint32);
2591 void startphase3Lab(
Signal* signal);
2592 void startphase4Lab(
Signal* signal);
2593 void startphase6Lab(
Signal* signal);
2594 void moreconnectionsLab(
Signal* signal);
2595 void scanReleaseLocksLab(
Signal* signal);
2596 void closeScanLab(
Signal* signal);
2597 void nextScanConfLoopLab(
Signal* signal);
2598 void scanNextLoopLab(
Signal* signal);
2599 void commitReqLab(
Signal* signal, Uint32 gci_hi, Uint32 gci_lo);
2600 void completeTransLastLab(
Signal* signal);
2601 void tupScanCloseConfLab(
Signal* signal);
2602 void tupCopyCloseConfLab(
Signal* signal);
2603 void accScanCloseConfLab(
Signal* signal);
2604 void accCopyCloseConfLab(
Signal* signal);
2605 void nextScanConfScanLab(
Signal* signal);
2606 void nextScanConfCopyLab(
Signal* signal);
2607 void continueScanNextReqLab(
Signal* signal);
2608 bool keyinfoLab(
const Uint32 * src, Uint32 len);
2609 void copySendTupkeyReqLab(
Signal* signal);
2610 void storedProcConfScanLab(
Signal* signal);
2611 void storedProcConfCopyLab(
Signal* signal);
2612 void copyStateFinishedLab(
Signal* signal);
2613 void lcpCompletedLab(
Signal* signal);
2614 void lcpStartedLab(
Signal* signal);
2615 void contChkpNextFragLab(
Signal* signal);
2616 void startLcpRoundLab(
Signal* signal);
2617 void startFragRefLab(
Signal* signal);
2618 void srCompletedLab(
Signal* signal);
2619 void openFileInitLab(
Signal* signal);
2620 void openSrFrontpageLab(
Signal* signal);
2621 void openSrLastFileLab(
Signal* signal);
2622 void openSrNextFileLab(
Signal* signal);
2623 void openExecSrStartLab(
Signal* signal);
2624 void openExecSrNewMbyteLab(
Signal* signal);
2625 void openSrFourthPhaseLab(
Signal* signal);
2626 void openSrFourthZeroSkipInitLab(
Signal* signal);
2627 void openSrFourthZeroLab(
Signal* signal);
2628 void openExecLogLab(
Signal* signal);
2629 void checkInitCompletedLab(
Signal* signal);
2630 void closingSrLab(
Signal* signal);
2631 void closeExecSrLab(
Signal* signal);
2632 void execLogComp(
Signal* signal);
2633 void execLogComp_extra_files_closed(
Signal* signal);
2634 void closeWriteLogLab(
Signal* signal);
2635 void closeExecLogLab(
Signal* signal);
2636 void writePageZeroLab(
Signal* signal, Uint32 from);
2637 void lastWriteInFileLab(
Signal* signal);
2638 void initWriteEndLab(
Signal* signal);
2639 void initFirstPageLab(
Signal* signal);
2640 void writeGciZeroLab(
Signal* signal);
2641 void writeDirtyLab(
Signal* signal);
2642 void writeInitMbyteLab(
Signal* signal);
2643 void writeLogfileLab(
Signal* signal);
2644 void firstPageWriteLab(
Signal* signal);
2645 void readSrLastMbyteLab(
Signal* signal);
2646 void readSrLastFileLab(
Signal* signal);
2647 void readSrNextFileLab(
Signal* signal);
2648 void readExecSrLab(
Signal* signal);
2649 void readExecLogLab(
Signal* signal);
2650 void readSrFourthPhaseLab(
Signal* signal);
2651 void readSrFourthZeroLab(
Signal* signal);
2652 void copyLqhKeyRefLab(
Signal* signal);
2653 void restartOperationsLab(
Signal* signal);
2654 void lqhTransNextLab(
Signal* signal);
2655 void restartOperationsAfterStopLab(
Signal* signal);
2656 void startphase1Lab(
Signal* signal, Uint32
config, Uint32 nodeId);
2657 void tupkeyConfLab(
Signal* signal);
2658 void copyTupkeyRefLab(
Signal* signal);
2659 void copyTupkeyConfLab(
Signal* signal);
2660 void scanTupkeyConfLab(
Signal* signal);
2661 void scanTupkeyRefLab(
Signal* signal);
2662 void accScanConfScanLab(
Signal* signal);
2663 void accScanConfCopyLab(
Signal* signal);
2664 void scanLockReleasedLab(
Signal* signal);
2665 void openSrFourthNextLab(
Signal* signal);
2666 void closingInitLab(
Signal* signal);
2667 void closeExecSrCompletedLab(
Signal* signal);
2668 void readSrFrontpageLab(
Signal* signal);
2671 void sendAddAttrReq(
Signal* signal);
2672 void sendAddFragReq(
Signal* signal);
2673 void dropTab_wait_usage(
Signal*);
2675 void wait_readonly(
Signal*);
2676 int check_tabstate(
Signal * signal,
const Tablerec * tablePtrP, Uint32 op);
2683 virtual bool getParam(
const char*
name, Uint32* count);
2688 bool validate_filter(
Signal*);
2691 void define_backup(
Signal*);
2692 void execDEFINE_BACKUP_REF(
Signal*);
2693 void execDEFINE_BACKUP_CONF(
Signal*);
2694 void execBACKUP_FRAGMENT_REF(
Signal* signal);
2695 void execBACKUP_FRAGMENT_CONF(
Signal* signal);
2696 void execLCP_PREPARE_REF(
Signal* signal);
2697 void execLCP_PREPARE_CONF(
Signal* signal);
2698 void execEND_LCPREF(
Signal* signal);
2699 void execEND_LCPCONF(
Signal* signal);
2700 Uint32 m_backup_ptr;
2702 void send_restore_lcp(
Signal * signal);
2703 void execRESTORE_LCP_REF(
Signal* signal);
2704 void execRESTORE_LCP_CONF(
Signal* signal);
2711 void initReportStatus(
Signal* signal);
2713 void checkReportStatus(
Signal* signal);
2715 void reportStatus(
Signal* signal);
2717 void logfileInitCompleteReport(
Signal* signal);
2721 void unlockError(
Signal* signal, Uint32 error);
2722 void handleUserUnlockRequest(
Signal* signal);
2737 Uint32 readPrimaryKeys(Uint32 opPtrI, Uint32 * dst,
bool xfrm);
2741 Uint32, Uint32, Uint32);
2747 int compare_key(
const TcConnectionrec*,
const Uint32 * ptr, Uint32 len);
2755 Uint32 m_tup_frag_ptr_i;
2761 void get_nr_op_info(
Nr_op_info*, Uint32 page_id = RNIL);
2765 void acckeyconf_load_diskpage_callback(
Signal*, Uint32, Uint32);
2768 void next_scanconf_load_diskpage(
Signal* signal,
2779 void next_scanconf_load_diskpage_callback(
Signal* signal, Uint32, Uint32);
2781 void tupcommit_conf_callback(
Signal* signal, Uint32 tcPtrI);
2799 #define ZADDFRAGREC_FILE_SIZE 1
2802 UintR cfirstfreeAddfragrec;
2803 UintR caddfragrecFileSize;
2804 Uint32 c_active_add_frag_ptr_i;
2809 RSS_AP_SNAPSHOT(c_fragment_pool);
2811 #define ZGCPREC_FILE_SIZE 1
2814 UintR cgcprecFileSize;
2818 UintR chostFileSize;
2820 #define ZNO_CONCURRENT_LCP 1
2823 UintR cfirstfreeLcpLoc;
2826 #define ZLOG_PART_FILE_SIZE 4
2829 UintR clogPartFileSize;
2830 Uint32 clogFileSize;
2831 Uint32 cmaxLogFilesInPageZero;
2836 UintR cfirstfreeLogFile;
2837 UintR clogFileFileSize;
2839 #define ZLFO_MIN_FILE_SIZE 256
2843 UintR cfirstfreeLfo;
2848 UintR cfirstfreeLogPage;
2849 UintR clogPageFileSize;
2850 Uint32 clogPageCount;
2852 #define ZPAGE_REF_FILE_SIZE 20
2855 UintR cfirstfreePageRef;
2856 UintR cpageRefFileSize;
2861 Uint32 cscanrecFileSize;
2867 UintR ctabrecFileSize;
2872 UintR cfirstfreeTcConrec;
2873 UintR ctcConnectrecFileSize;
2878 UintR ctcNodeFailrecFileSize;
2882 Uint32 c_firstInNodeGroup;
2889 Uint32 cnoOfFragsCheckpointed;
2890 Uint32 c_last_force_lcp_time;
2891 Uint32 c_free_mb_force_lcp_limit;
2892 Uint32 c_free_mb_tail_problem_limit;
2902 UintR cmaxWordsAtNodeRec;
2903 UintR cbookedAccOps;
2909 Uint8 caddNodeState;
2917 Uint8 cinitialStartOngoing;
2922 ExecUndoLogState csrExecUndoLogState;
2927 LcpCloseState clcpCompletedState;
2942 ,SRR_START_REC_REQ_ARRIVED = 1
2943 ,SRR_REDO_COMPLETE = 2
2944 ,SRR_FIRST_LCP_DONE = 3
2946 Uint32 cstartRecReqData;
2952 Uint32 cnoFragmentsExecSr;
2957 Uint32 cnoOutstandingExecFragReq;
2963 Uint8 csrPhaseStarted;
2967 Uint8 csrPhasesCompleted;
2971 BlockReference cmasterDihBlockref;
2984 UintR crestartOldestGci;
2989 UintR crestartNewestGci;
2999 UintR cnewestCompletedGci;
3013 UintR ccurrentGcprec;
3017 Uint8 cnoActiveCopy;
3018 UintR cactiveCopy[4];
3024 BlockReference caccBlockref;
3025 BlockReference ctupBlockref;
3026 BlockReference ctuxBlockref;
3027 BlockReference cownref;
3028 Uint32 cTransactionDeadlockDetectionTimeout;
3029 UintR cLqhTimeOutCount;
3030 UintR cLqhTimeOutCheckCount;
3031 UintR cnoOfLogPages;
3047 UintR cpackedListIndex;
3048 Uint16 cpackedList[MAX_NDB_NODES];
3049 UintR cnodeData[MAX_NDB_NODES];
3050 UintR cnodeStatus[MAX_NDB_NODES];
3063 UintR preComputedRequestInfoMask;
3064 UintR ctransidHash[1024];
3068 Uint32 m_use_om_init;
3069 Uint32 c_error_insert_table_id;
3071 #ifndef NO_REDO_PAGE_CACHE
3095 struct RedoCacheLogPageRecord
3097 RedoCacheLogPageRecord() {}
3110 Uint32 rest[8192-27];
3112 inline bool equal(
const RedoCacheLogPageRecord & p)
const {
3114 (p.m_part_no == m_part_no) &&
3115 (p.m_page_no == m_page_no) &&
3116 (p.m_file_no == m_file_no);
3119 inline Uint32 hashValue()
const {
3120 return (m_part_no << 24) + (m_file_no << 16) + m_page_no;
3123 struct RedoPageCache
3125 RedoPageCache() : m_hash(m_pool), m_lru(m_pool),
3126 m_hits(0),m_multi_page(0), m_multi_miss(0) {}
3131 Uint32 m_multi_page;
3132 Uint32 m_multi_miss;
3133 } m_redo_page_cache;
3135 void evict(RedoPageCache&, Uint32 cnt);
3137 void addCachePages(RedoPageCache&,
3140 LogFileOperationRecord*);
3141 void release(RedoPageCache&);
3144 #ifndef NO_REDO_OPEN_FILE_CACHE
3145 struct RedoOpenFileCache
3147 RedoOpenFileCache() : m_lru(m_pool), m_hits(0), m_close_cnt(0) {}
3153 } m_redo_open_file_cache;
3155 void openFileRw_cache(
Signal* signal, LogFileRecordPtr olfLogFilePtr);
3156 void closeFile_cache(
Signal* signal, LogFileRecordPtr logFilePtr, Uint32);
3157 void release(
Signal*, RedoOpenFileCache&);
3161 bool is_same_trans(Uint32 opId, Uint32 trid1, Uint32 trid2);
3162 void get_op_info(Uint32 opId, Uint32 *hash, Uint32* gci_hi, Uint32* gci_lo,
3163 Uint32* transId1, Uint32* transId2);
3178 union { Uint32 nextPool; Uint32 nextHash; };
3180 Uint32 reference_count;
3183 return ((p.transid1 == transid1) && (p.transid2 == transid2));
3186 inline Uint32 hashValue()
const {
3195 void execREMOVE_MARKER_ORD(
Signal* signal);
3198 void ndbdFailBlockCleanupCallback(
Signal* signal, Uint32 failedNodeID, Uint32 ignoredRc);
3206 Uint32 build_event_rep(
Signal* signal)
const
3212 struct {
const Uint64* ptr; Uint64 old; } vars[] = {
3215 const size_t num =
sizeof(vars)/
sizeof(vars[0]);
3220 for (
size_t i = 0;
i < num ;
i++)
3223 (signal->theData[1+(2*
i)+1] |(Uint64(signal->theData[1+(2*
i)])<< 32));
3227 for (
size_t i = 0;
i < num ;
i++)
3229 signal->theData[1 +
i] = (Uint32)(*vars[
i].ptr - vars[
i].old);
3234 Uint32 build_continueB(
Signal* signal)
const
3237 const Uint64* vars[] = { &operations };
3238 const size_t num =
sizeof(vars)/
sizeof(vars[0]);
3240 for (
size_t i = 0;
i < num ;
i++)
3242 signal->theData[1+
i*2] = Uint32(*vars[
i] >> 32);
3243 signal->theData[1+
i*2+1] = Uint32(*vars[
i]);
3250 Uint32 c_max_redo_lag;
3251 Uint32 c_max_redo_lag_counter;
3252 Uint64 cTotalLqhKeyReqCount;
3253 Uint32 c_max_parallel_scans_per_frag;
3255 inline bool getAllowRead()
const {
3261 inline bool TRACE_OP_CHECK(
const TcConnectionrec* regTcPtr);
3263 void TRACE_OP_DUMP(
const TcConnectionrec* regTcPtr,
const char * pos);
3267 Uint32 c_master_node_id;
3270 Uint32 get_node_status(Uint32 nodeId)
const;
3271 bool check_ndb_versions()
const;
3273 void suspendFile(
Signal* signal, Uint32 filePtrI, Uint32 millis);
3276 void send_runredo_event(
Signal*, LogPartRecord *, Uint32 currgci);
3278 void sendFireTrigConfTc(
Signal* signal, BlockReference ref, Uint32 Tdata[]);
3284 Dblqh::ScanRecord::check_scan_batch_completed()
const
3286 Uint32 max_rows = m_max_batch_size_rows;
3287 Uint32 max_bytes = m_max_batch_size_bytes;
3289 return (max_rows > 0 && (m_curr_batch_size_rows >= max_rows)) ||
3290 (max_bytes > 0 && (m_curr_batch_size_bytes >= max_bytes));
3295 Dblqh::i_get_acc_ptr(ScanRecord* scanP, Uint32* &acc_ptr, Uint32
index)
3303 acc_ptr= (Uint32*)&scanP->scan_acc_op_ptr[0];
3307 Uint32 segmentIVal, segment, segmentOffset;
3310 segment= (index + SectionSegment::DataLength -1) /
3311 SectionSegment::DataLength;
3312 segmentOffset= (index - 1) % SectionSegment::DataLength;
3314 ndbassert( segment < ScanRecord::MaxScanAccSegments );
3316 segmentIVal= scanP->scan_acc_op_ptr[ segment ];
3317 getSection(segPtr, segmentIVal);
3319 acc_ptr= &segPtr.p->theData[ segmentOffset ];
3325 Dblqh::is_same_trans(Uint32 opId, Uint32 trid1, Uint32 trid2)
3327 TcConnectionrecPtr regTcPtr;
3329 ptrCheckGuard(regTcPtr, ctcConnectrecFileSize, tcConnectionrec);
3330 return ((regTcPtr.p->transid[0] == trid1) &&
3331 (regTcPtr.p->transid[1] == trid2));
3336 Dblqh::get_op_info(Uint32 opId, Uint32 *hash, Uint32* gci_hi, Uint32* gci_lo,
3337 Uint32* transId1, Uint32* transId2)
3339 TcConnectionrecPtr regTcPtr;
3341 ptrCheckGuard(regTcPtr, ctcConnectrecFileSize, tcConnectionrec);
3342 *hash = regTcPtr.p->hashValue;
3343 *gci_hi = regTcPtr.p->gci_hi;
3344 *gci_lo = regTcPtr.p->gci_lo;
3345 *transId1 = regTcPtr.p->transid[0];
3346 *transId2 = regTcPtr.p->transid[1];
3349 #include "../dbacc/Dbacc.hpp"
3353 Dblqh::accminupdate(
Signal* signal, Uint32 opId,
const Local_key* key)
3355 TcConnectionrecPtr regTcPtr;
3357 ptrCheckGuard(regTcPtr, ctcConnectrecFileSize, tcConnectionrec);
3358 signal->theData[0] = regTcPtr.p->accConnectrec;
3359 signal->theData[1] = key->m_page_no;
3360 signal->theData[2] = key->m_page_idx;
3361 c_acc->execACCMINUPDATE(signal);
3363 if (ERROR_INSERTED(5714))
3365 FragrecordPtr regFragptr;
3366 regFragptr.i = regTcPtr.p->fragmentptr;
3367 c_fragment_pool.
getPtr(regFragptr);
3368 if (regFragptr.p->m_copy_started_state == Fragrecord::AC_NR_COPY)
3369 ndbout <<
" LK: " << *key;
3372 if (ERROR_INSERTED(5712) || ERROR_INSERTED(5713))
3373 ndbout <<
" LK: " << *key;
3374 regTcPtr.p->m_row_id = *key;
3379 Dblqh::accremoverow(
Signal* signal, Uint32 opId,
const Local_key* key)
3381 TcConnectionrecPtr regTcPtr;
3383 ptrCheckGuard(regTcPtr, ctcConnectrecFileSize, tcConnectionrec);
3384 c_acc->removerow(regTcPtr.p->accConnectrec, key);
3389 Dblqh::TRACE_OP_CHECK(
const TcConnectionrec* regTcPtr)
3391 if (ERROR_INSERTED(5714))
3393 FragrecordPtr regFragptr;
3394 regFragptr.i = regTcPtr->fragmentptr;
3395 c_fragment_pool.
getPtr(regFragptr);
3396 return regFragptr.p->m_copy_started_state == Fragrecord::AC_NR_COPY;
3399 return (ERROR_INSERTED(5712) &&
3400 (regTcPtr->operation == ZINSERT ||
3401 regTcPtr->operation == ZDELETE)) ||
3402 ERROR_INSERTED(5713);