After a dump is triggered, you can view the dump progress and history in views.
View the progress of a minor compaction
Log in to the
systenant or a user tenant of the cluster as the tenant administrator.View the progress of the minor compaction, including the amount of data to be compacted and the estimated time of completion.
The
GV$OB_TABLET_COMPACTION_PROGRESSview displays the progress of tablet-level compaction tasks. It only shows tasks that are currently running and does not show tasks after they are completed. The following statement queries the progress of a minor compaction:View the progress of a minor compaction in the
systenantobclient> SELECT * FROM oceanbase.GV$OB_TABLET_COMPACTION_PROGRESS WHERE TYPE='MINI_MERGE'\GView the progress of a minor compaction in a user tenant
MySQL mode
obclient> SELECT * FROM oceanbase.GV$OB_TABLET_COMPACTION_PROGRESS WHERE TYPE='MINI_MERGE'\GOracle mode
obclient> SELECT * FROM SYS.GV$OB_TABLET_COMPACTION_PROGRESS WHERE TYPE='MINI_MERGE'\G
The following table shows an example of the query result.
*************************** 1. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2401 TENANT_ID: 1002 TYPE: MINI_MERGE LS_ID: 1001 TABLET_ID: 1152921504606847235 COMPACTION_SCN: 1680514780195130031 TASK_ID: Y9610BA2DA3E-0005F7FD6E1FE0FF-0-0 STATUS: NODE_RUNNING DATA_SIZE: 31890729 UNFINISHED_DATA_SIZE: 3351030 PROGRESSIVE_COMPACTION_ROUND: 1 CREATE_TIME: 2023-04-03 17:49:17.278506 START_TIME: 2023-04-03 17:51:57.953999 ESTIMATED_FINISH_TIME: 2023-04-03 23:32:25.969930 START_CG_ID: 0 END_CG_ID: 0 1 row in setThe following table describes the fields in the result.
TYPE: the type of the compaction task.MDS_TABLE_MERGE: persists the system metadata to disk in the SSTable format.MAJOR_MERGE: tenant-level compactionMEDIUM_MERGE: partition-level compactionMINI_MERGE: Mini compaction, which converts a MemTable into a Mini SSTable.MINOR_MERGE: Minor compaction, which combines multiple Mini SSTables into a new Mini SSTable or combines multiple Mini SSTables with a Minor SSTable into a new Minor SSTable.META_MAJOR_MERGE: a special type of compaction that combines data before a specified point in time into a Meta Major SSTable. The data format of the Meta Major SSTable is the same as that of a Major SSTable, but it does not contain multi-version data or uncommitted transaction data.
STATUS: the status of the task. When the task is running, the value of this field isNODE_RUNNING.DATA_SIZE: the total amount of data to be compacted.UNFINISHED_DATA_SIZE: the amount of data that has not been compacted.ESTIMATED_FINISH_TIME: the estimated time of completion.
For more information about the fields in the
GV$OB_TABLET_COMPACTION_PROGRESSview, see GV$OB_TABLET_COMPACTION_PROGRESS.If a tablet is not shown in the view or has been in the process of compaction for a long time, you can view the
GV$OB_COMPACTION_DIAGNOSE_INFOdiagnostic view for further inspection to check whether an exception has occurred.For more information about the fields in the
GV$OB_COMPACTION_DIAGNOSE_INFOview, see GV$OB_COMPACTION_DIAGNOSE_INFO.
View compaction history
Log in to the
systenant or a user tenant of the cluster as the tenant administrator.View the compaction history.
The
GV$OB_TABLET_COMPACTION_HISTORYview displays the history of tablet-level compactions. You can execute the following statements to query the information:View the compaction history in the sys tenant
obclient> SELECT * FROM oceanbase.GV$OB_TABLET_COMPACTION_HISTORY WHERE TYPE='MINI_MERGE'\GView the compaction history in a user tenant
MySQL mode
obclient> SELECT * FROM oceanbase.GV$OB_TABLET_COMPACTION_HISTORY WHERE TYPE='MINI_MERGE'\GOracle mode
obclient> SELECT * FROM SYS.GV$OB_TABLET_COMPACTION_HISTORY WHERE TYPE='MINI_MERGE'\G
Here is the sample result:
*************************** 1. row *************************** SVR_IP: 11.xxx.xxx.xx SVR_PORT: 13847 TENANT_ID: 1002 LS_ID: 1001 TABLET_ID: 201770 TYPE: MINI_MERGE COMPACTION_SCN: 1745921690220646000 START_TIME: 2025-04-29 19:46:48.326791 FINISH_TIME: 2025-04-29 19:46:48.344048 TASK_ID: Y36170BA2D939-000624702D74513B-0-0 OCCUPY_SIZE: 6395 MACRO_BLOCK_COUNT: 1 MULTIPLEXED_MACRO_BLOCK_COUNT: 0 NEW_MICRO_COUNT_IN_NEW_MACRO: 1 MULTIPLEXED_MICRO_COUNT_IN_NEW_MACRO: 0 TOTAL_ROW_COUNT: 10 INCREMENTAL_ROW_COUNT: 10 COMPRESSION_RATIO: 0.96 NEW_FLUSH_DATA_RATE: 2046 PROGRESSIVE_COMPACTION_ROUND: 0 PROGRESSIVE_COMPACTION_NUM: 0 PARALLEL_DEGREE: 1 PARALLEL_INFO: - PARTICIPANT_TABLE: table_cnt=1,start_scn=1,end_scn=1745921690220646000; MACRO_ID_LIST: 25745 COMMENTS: comment="block_io_us=232;cost_mb=2;time=add_time:1745927208325419|total=18.17ms;"; START_CG_ID: 0 END_CG_ID: 0 KEPT_SNAPSHOT: {type:"SNAPSHOT_ON_TABLET", snapshot:1745863202001499000} MERGE_LEVEL: MACRO_BLOCK_LEVEL 1 row in setFor more information about the fields in the
GV$OB_TABLET_COMPACTION_HISTORYview, see GV$OB_TABLET_COMPACTION_HISTORY.