Documentation Home
NDB Cluster Internals
Related Documentation Download this Manual
PDF (US Ltr) - 1.2Mb
PDF (A4) - 1.2Mb


2.120 DUMP 7021

Code

7021

Symbol

---

Kernel Block

DBDIH

Description.  Writes table fragment status information for a single NDB table to the cluster log. DUMP 7015 is the same is this command, except that DUMP 7015 logs the information for multiple (or all) NDB tables.

The table to obtain information for is specified by table ID. You can find the ID for a given table in the output of ndb_show_tables, as shown here:

$> ndb_show_tables
id    type                 state    logging database     schema   name
29    OrderedIndex         Online   No      sys          def      PRIMARY
1     IndexTrigger         Online   -                             NDB$INDEX_11_CUSTOM
3     IndexTrigger         Online   -                             NDB$INDEX_15_CUSTOM
8     UserTable            Online   Yes     mysql        def      NDB$BLOB_7_3
5     IndexTrigger         Online   -                             NDB$INDEX_28_CUSTOM
13    OrderedIndex         Online   No      sys          def      PRIMARY
10    UserTable            Online   Yes     test         def      n1
27    UserTable            Online   Yes     c            def      t1
...

Sample Invocation/Output.  Using the table ID for table n1 found in the ndb_show_tables sample output shown previously (and highlighted therein), an invocation of this command might look like this when running ndb_mgm in the system shell:

$> ndb_mgm -e 'ALL DUMP 7021 10'
Connected to Management Server at: localhost:1186
Sending dump signal with data:
0x00001b67 0x0000000a
Sending dump signal with data:
0x00001b67 0x0000000a

This writes the following output to the cluster log:

2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 5: Table 10: TabCopyStatus: 0 TabUpdateStatus: 0 TabLcpStatus: 3
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 5:  Fragment 0: noLcpReplicas==0  0(on 5)=59(Idle) 1(on 6)=59(Idle)
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 5:  Fragment 1: noLcpReplicas==0  0(on 6)=59(Idle) 1(on 5)=59(Idle)
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 6: Table 10: TabCopyStatus: 0 TabUpdateStatus: 0 TabLcpStatus: 3
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 6:  Fragment 0: noLcpReplicas==0  0(on 5)=59(Idle) 1(on 6)=59(Idle)
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 6:  Fragment 1: noLcpReplicas==0  0(on 6)=59(Idle) 1(on 5)=59(Idle)
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 7: Table 10: TabCopyStatus: 0 TabUpdateStatus: 0 TabLcpStatus: 3
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 7:  Fragment 0: noLcpReplicas==0  0(on 5)=59(Idle) 1(on 6)=59(Idle)
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 7:  Fragment 1: noLcpReplicas==0  0(on 6)=59(Idle) 1(on 5)=59(Idle)
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 8: Table 10: TabCopyStatus: 0 TabUpdateStatus: 0 TabLcpStatus: 3
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 8:  Fragment 0: noLcpReplicas==0  0(on 5)=59(Idle) 1(on 6)=59(Idle)
2016-07-21 12:12:11 [MgmtSrvr] INFO     -- Node 8:  Fragment 1: noLcpReplicas==0  0(on 6)=59(Idle) 1(on 5)=59(Idle)

Additional Information.  More information about each of the fields written by DUMP 7021 into the cluster log is shown in the next few paragraphs. The enumerations are defined as properties of structure TabRecord in storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp.

TabCopyStatus (table copy status) takes one of the following values: 0: CS_IDLE, 1: CS_SR_PHASE1_READ_PAGES, 2: CS_SR_PHASE2_READ_TABLE, 3: CS_SR_PHASE3_COPY_TABLE, 4: CS_REMOVE_NODE, 5: CS_LCP_READ_TABLE, 6: CS_COPY_TAB_REQ, 7: CS_COPY_NODE_STATE, 8: CS_ADD_TABLE_MASTER, 9: CS_ADD_TABLE_SLAVE, 10: CS_INVALIDATE_NODE_LCP, 11: CS_ALTER_TABLE, 12: CS_COPY_TO_SAVE, 13: CS_GET_TABINFO.

TabUpdateStatus (table update status) takes one of the following values: 0: US_IDLE, 1: US_LOCAL_CHECKPOINT, 2: US_LOCAL_CHECKPOINT_QUEUED, 3: US_REMOVE_NODE, 4: US_COPY_TAB_REQ, 5: US_ADD_TABLE_MASTER, 6: US_ADD_TABLE_SLAVE, 7: US_INVALIDATE_NODE_LCP, 8: US_CALLBACK.

TabLcpStatus (table local checkpoint status) takes one of the following values: 1: TLS_ACTIVE, 2: TLS_WRITING_TO_FILE, 3: TLS_COMPLETED.

Table fragment information is also provided for each node. This is similar to what is shown here:

Node 5:  Fragment 0: noLcpReplicas==0  0(on 5)=59(Idle) 1(on 6)=59(Idle)

The node and fragment are identified by their IDs. noLcpReplicas represents the number of fragment replicas remaining to be checkpointed by any ongoing LCP. The remainder of the line has the format shown here:

replica_id(on node_id)=lcp_id(status)

replica_id, node_id, and lcp_id are the IDs of, respectively, the fragment replica, node, and local checkpoint. status is always one of Idle or Ongoing.