Updated on 2024-12-01 GMT+08:00

Querying the Synchronization Progress

This section describes how to check the synchronization progress of each synchronization object.

  • During the full synchronization, DRS displays the progress overview. You can view the synchronization progress of structures, data, and indexes. The synchronization progress is displayed based on the number of synchronized objects. When the progress reaches 100%, the synchronization is complete. The synchronization of data and indexes is relatively slow.
  • During the full synchronization, you can view the synchronization progress of a specific object and the synchronization details. If the number of objects is the same as that of synchronized objects, the synchronization is complete. You can view the synchronization progress of each object in detail. During incremental synchronization, the progress details are not displayed. You can view the consistency status on the Synchronization Comparison tab.
  • During an incremental synchronization, DRS displays the incremental synchronization delay. You can determine the synchronization status between the source and destination databases based on the delay. If the delay is 0, the source and destination databases are instantaneously consistent, and no new transaction needs to be synchronized.

Prerequisites

You have logged in to the DRS console.

Procedure

  1. On the Data Synchronization Management page, click the target synchronization task name in the Task Name/ID column.
  2. On the displayed page, click Synchronization Progress to view table synchronization progress.

    • Check the synchronization progress in percentage.
      • When a full synchronization is complete, the progress reaches 100%.
      • After the full synchronization is complete, the incremental synchronization starts. You can view the incremental synchronization delay on the Synchronization Progress tab.
      • You can also view the incremental synchronization delay on the Data Synchronization Management page. When the incremental synchronization delay exceeds the preset or default threshold, the value of the incremental synchronization delay is displayed in red in the task list.
      • When the delay is 0s, data in the source database is synchronized to the destination database in real time.

      "Delay" refers to the delay from when the transaction was submitted to the source database to when it is synchronized to the destination database and executed.

      Transactions are synchronized as follows:

      1. Data is extracted from the source database.
      2. The data is transmitted over the network.
      3. DRS parses the source logs.
      4. The transaction is executed on the destination database.

      If the delay is 0, the source database is consistent with the destination database, and no new transactions need to be synchronized.

      Transactions that have been there for a long time without being submitted and frequent DDL operations may result in excessive synchronization delay.

    • View the synchronization progress details. In the Migration Details area, locate the target synchronization object and click View Details in the Operation column to view the synchronization progress.

      The synchronization progress details only display the data synchronized in the full synchronization and the skipped structures and cannot be updated. The progress details are not displayed after incremental synchronization starts. You can compare synchronization items on the Synchronization Comparison page.

      Figure 1 Synchronization progress details

    • Skip synchronization objects. In the Migration Details area, locate the synchronization object and click View Details in the Operation column. On the displayed page, click Skip and Restart in the Operation column to skip the object.
      • For a synchronization task from MySQL, MariaDB, GaussDB(for MySQL), or TiDB, synchronization objects can be skipped during the full synchronization.
      • Migration objects that can be skipped include databases, functions, procedures, table_indexes, table_structure, and views.
      • After a synchronization object is skipped, the task will be resumed. If the task is paused or abnormal, the task will be restarted after you click Skip and Restart.
      • If a task is in the full synchronization state, an object may be synchronized before being skipped. In this case, skipping the object is not applied.
      • After an object is skipped, if operations associated with the object are still performed during subsequent synchronization, the task fails. For example, after table_structure is skipped, the task fails because the object is not found when indexes and data of the table are synchronized.
      • After an object is skipped, the result for a comparison is inconsistent.
      • Skipping table_structure of a table without a primary key will cause data inconsistency. In addition, the task may fail because the table is not found. Perform the operation after confirmation.
      • If a DRS task fails because the table is not found after you skip a table without a primary key, contact O&M engineers for the destination database to create the corresponding table in the destination database based on the table structure of the source database and error log information, and click Resume in the Operation column of the task to submit the task again.

  3. In the MySQL synchronization scenario, you can view the information about the source position and consumed position on the Synchronization Progress tab.

    The displayed position information is updated every 10 seconds.

    Figure 2 Synchronization position information

  4. In synchronization with Oracle serving as the source, MySQL to Kafka synchronization, and GaussDB to Kafka synchronization, on the Synchronization Progress tab, view the number of DML operations (Insert, Delete, and Update) performed on the source database. In the upper right corner of the Task Monitoring list, refresh the list and view the latest monitoring data.

    Figure 3 Task monitoring
    1. After you perform the DML operation on the source database and run the commit command to make the operation take effect, the operation data can be displayed in the Task Monitoring list.
    2. DRS collects statistics on the number of operations based on redo logs.
    3. For tables with large object (LOB) data type columns, Oracle records more information in redo logs than the information generated by the actual operations that is performed. The INSERT and UPDATE operations are first performed on non-LOB columns and then on LOB columns. DRS collects statistics only from the redo logs, so the number of recorded operations may be inconsistent with the actual number of changed rows according to operation audit.
    4. The Oracle MERGE statement can be converted into INSERT, UPDATE, and DELETE operations in the redo log. Thus, the number of rows changed by the MERGE statement are increased because the INSERT, UPDATE, and DELETE operations are separately recorded in the redo log.

  1. In the Oracle to GaussDB primary/standby or distributed, GaussDB primary/standby to MySQL, GaussDB distributed to MySQL, Oracle to MySQL (incremental), and Oracle to GaussDB(DWS) (incremental) synchronization scenarios, search for the detailed synchronization object information on the Synchronization Progress tab. The keywords for searching synchronization objects are case sensitive.

    Figure 4 Synchronization details