OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Migration Service

V4.2.4Community Edition
  • OMS Documentation
  • What's New
  • OMS Community Edition Introduction
    • What is OMS Community Edition?
    • Terms
    • OMS Community Edition HA
    • Architecture
      • Overview
      • Hierarchical functional system
      • Basic components
    • Limitations
  • Quick Start
    • Data migration process
    • Data synchronization process
  • Deploy OMS Community Edition
    • Deployment modes
    • System and network requirements
    • Memory and disk requirements
    • Prepare the environment
    • Deploy OMS Community Edition on a single node
    • Deploy OMS Community Edition on multiple nodes in a single region
    • Deploy OMS Community Edition on multiple nodes in multiple regions
    • Integrate the OIDC protocol into OMS Community Edition to implement SSO
    • Scale out OMS Community Edition
    • Check the deployment
    • Deploy a time-series database (Optional)
  • OMS Community Edition console
    • Log on to the console of OMS Community Edition
    • Overview
    • User center
      • Configure user information
      • Change your logon password
      • Log off
  • Data migration
    • Overview
    • Migrate data from a MySQL database to OceanBase Database Community Edition
    • Migrate data from HBase to OBKV
    • Migrate incremental data from OBKV to HBase
    • Migrate data between instances of OceanBase Database Community Edition
    • Migrate data in active-active disaster recovery scenarios
    • Migrate data from a TiDB database to OceanBase Database Community Edition
    • Migrate data from a PostgreSQL database to OceanBase Database Community Edition
    • Manage data migration tasks
      • View the details of a data migration task
      • Change the name of a data migration task
      • View and modify migration objects
      • Manage computing platforms
      • Use tags to manage data migration tasks
      • Perform batch operations on data migration tasks
      • Download and import settings of migration objects
      • Start and pause a data migration task
      • Release and delete a data migration task
    • Features
      • DML filtering
      • DDL synchronization
      • Configure matching rules for migration objects
      • Wildcard rules
      • Rename a database table
      • Use SQL conditions to filter data
      • Create and update a heartbeat table
      • Schema migration mechanisms
      • Schema migration operations
      • Set an incremental synchronization timestamp
      • Direct load
    • Supported DDL operations in incremental migration and limits
      • DDL synchronization from MySQL database to OceanBase Community Edition
        • Overview of DDL synchronization from a MySQL database to a MySQL tenant of OceanBase Database
        • CREATE TABLE
          • Create a table
          • Create a column
          • Create an index or a constraint
          • Create partitions
        • Data type conversion
        • ALTER TABLE
          • Modify a table
          • Operations on columns
          • Operations on constraints and indexes
          • Operations on partitions
        • TRUNCATE TABLE
        • RENAME TABLE
        • DROP TABLE
        • CREATE INDEX
        • DROP INDEX
        • DDL incompatibilities between MySQL database and OceanBase Community Edition
          • Overview
          • Incompatibilities of the CREATE TABLE statement
            • Incompatibilities of CREATE TABLE
            • Column types that are supported to create indexes or constraints
          • Incompatibilities of the ALTER TABLE statement
            • Incompatibilities of ALTER TABLE
            • Change the type of a constrained column
            • Change the type of an unconstrained column
            • Change the length of a constrained column
            • Change the length of an unconstrained column
            • Delete a constrained column
          • Incompatibilities of DROP INDEX operations
      • Supported DDL operations in incremental migration between MySQL tenants of OceanBase Database
  • Data synchronization
    • Data synchronization overview
    • Create a task to synchronize data from OceanBase Database Community Edition to a Kafka instance
    • Create a task to synchronize data from OceanBase Database Community Edition to a RocketMQ instance
    • Manage data synchronization tasks
      • View details of a data synchronization task
      • Change the name of a data synchronization task
      • View and modify synchronization objects
      • Use tags to manage data synchronization tasks
      • Perform batch operations on data synchronization tasks
      • Download and import the settings of synchronization objects
      • Start and pause a data synchronization task
      • Release and delete a data synchronization task
    • Features
      • DML filtering
      • DDL synchronization
      • Configure matching rules for synchronization objects
      • Rename a topic
      • Use SQL conditions to filter data
      • Column filtering
      • Data formats
  • Create and manage data sources
    • Create data sources
      • Create an OceanBase-CE data source
      • Create a MySQL data source
      • Create a TiDB data source
      • Create a Kafka data source
      • Create a RocketMQ data source
      • Create a PostgreSQL data source
      • Create an HBase data source
    • Manage data sources
      • View data source information
      • Copy a data source
      • Edit a data source
      • Delete a data source
    • Create a database user
    • User privileges
    • Enable binlogs for the MySQL database
  • OPS & Monitoring
    • O&M overview
    • Go to the overview page
    • Server
      • View server information
      • Update the quota
      • View server logs
    • Components
      • Store
        • Create a store
        • View details of a store
        • Update the configurations of a store
        • Start and pause a store
        • Delete a store
      • Incr-Sync
        • View details of an Incr-Sync component
        • Start and pause an Incr-Sync component
        • Migrate an Incr-Sync component
        • Update the configurations of an Incr-Sync component
        • Batch O&M
        • Delete an Incr-Sync component
      • Full-Import
        • View details of a Full-Import component
        • Pause a Full-Import component
        • Rerun and resume a Full-Import component
        • Update the configurations of a Full-Import component
        • Delete a Full-Import component
      • Full-Verification
        • View details of a Full-Verification component
        • Pause a Full-Verification component
        • Rerun and resume a Full-Verification component
        • Update the configurations of a Full-Verification component
        • Delete a Full-Verification component
    • O&M Task
      • View O&M tasks
      • Skip a task or subtask
      • Retry a task or subtask
  • System management
    • Permission Management
      • Overview
      • Manage users
      • Manage departments
    • Alert center
      • View task alerts
      • View system alerts
      • Manage alert settings
    • Associate with OCP
    • System parameters
      • Modify system parameters
      • Modify HA configurations
  • OMS Community Edition O&M
    • Manage OMS services
    • OMS logs
    • Component O&M
      • O&M operations for the Supervisor component
      • CLI-based O&M for the Connector component
      • O&M operations for the Store component
    • Component tuning
      • Incr-Sync or Full-Import tuning
    • Component parameters
      • Coordinator
      • Condition
      • Source Plugin
        • Overview
        • StoreSource
        • DataFlowSource
        • LogProxySource
        • KafkaSource (TiDB)
        • HBaseSource
      • Sink Plugin
        • Overview
        • JDBC-Sink
        • KafkaSink
        • DatahubSink
        • RocketMQSink
        • HBaseSink
      • Store parameters
        • Parameters of a MySQL store
        • Parameters of an OceanBase store
      • Parameters of the CM component
      • Parameters of the Supervisor component
      • Parameters of the Full-Verification component
    • Set throttling
  • Reference Guide
    • API Reference
      • Overview
      • CreateProject
      • StartProject
      • StopProject
      • ResumeProject
      • ReleaseProject
      • DeleteProject
      • ListProjects
      • DescribeProject
      • DescribeProjectSteps
      • DescribeProjectStepMetric
      • DescribeProjectProgress
      • DescribeProjectComponents
      • ListProjectFullVerifyResult
      • StartProjectsByLabel
      • StopProjectsByLabel
      • CreateMysqlDataSource
      • CreateMySQLMasterSlaveDataSource
      • CreateOceanBaseDataSource
      • ListDataSource
      • CreateLabel
      • ListAllLabels
      • ListFullVerifyInconsistenciesResult
      • ListFullVerifyCorrectionsResult
      • UpdateStore
      • UpdateFullImport
      • UpdateIncrSync
      • UpdateFullVerification
    • OMS error codes
    • Alert Reference
      • oms_host_down
      • oms_host_down_migrate_resource
      • oms_host_threshold
      • oms_migration_failed
      • oms_migration_delay
      • oms_sync_failed
      • oms_sync_status_inconsistent
      • oms_sync_delay
    • Telemetry parameters
  • Upgrade Guide
    • Overview
    • Upgrade OMS Community Edition in single-node deployment mode
    • Upgrade OMS Community Edition in multi-node deployment mode
    • FAQ
  • FAQ
    • OMS Community Edition Troubleshooting Guide
    • General O&M
      • How do I modify the resource quotas of an OMS container?
      • Clear files in the Store component
      • How do I troubleshoot the OMS server down issue?
      • Deploy InfluxDB for OMS
      • Increase the disk space of the OMS host
    • Task diagnostics
      • What do I do when a store does not have data of the timestamp requested by the downstream?
      • What do I do when OceanBase Store failed to access an OceanBase cluster through RPC?
    • OPS & monitoring
      • What are the alert rules?
    • Data synchronization
      • FAQ about synchronization to a message queue
        • What are the strategies for ensuring the message order in incremental data synchronization to Kafka
    • Data migration
      • Full migration
        • How do I query the ID of a checker?
        • How do I query log files of the Checker component of OMS?
        • How do I query the verification result files of the Checker component of OMS?
        • What do I do if the destination table does not exist?
        • What can I do when the full migration failed due to LOB fields?
        • What do I do if garbled characters cannot be written into OceanBase Database V3.1.2?
      • Incremental synchronization
        • How do I skip DDL statements?
        • How do I update whitelists and blacklists?
        • What are the application scope and limits of ETL?
    • Logon and password
      • What do I do if my logon password is locked?
    • Installation and deployment
      • How do I upgrade Store?
      • How do I upgrade CDC?
      • What do I do when the "Failed to fetch" error is reported?
      • Change port numbers for components
      • Switch to the standby database

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Migration Service
  3. V4.2.4

OMS Community Edition Troubleshooting Guide

Last Updated:2026-09-04 08:14:02

Troubleshooting approach
Product features, components, and log locations
Schema migration
Full migration
Incremental synchronization
Full verification
Forward switchover
Reverse incremental synchronization
Control components
Installation issues
Full migration and incremental synchronization performance tuning
Concurrency, JVM memory, and number of records per shard
Incremental synchronization
metrics.log analysis
Incremental latency: suspected hotspot issue
Full verification data issues
How to dump data from Store
Typical use cases and features
Multi-table aggregation
Hidden columns used to migrate OceanBase tables without primary keys
OceanBase Direct Load
Reverse incremental migration
Active-active disaster recovery
Full verification
System views used by OMS Community Edition to select tables and views during task creation
MySQL
MySQL tenant of OceanBase Database

Troubleshooting approach

When an error occurs in the OMS Community Edition, first check whether the error is caused by the usage restrictions mentioned in the official documentation. The following figure shows the overall troubleshooting approach for data migration or data synchronization tasks in the OMS Community Edition.

FAQ-1

Product features, components, and log locations

Note

All log files are automatically archived and compressed. Use the timestamps to identify the relevant log file when viewing logs.

Schema migration

Type
Description
Component Ghana
Log directory /home/admin/logs/ghana/Ghana
Structure conversion logs (invoked by DBCat component) dbcat.log
General error logs common-error.log
General output logs common-default.log
Some query logs check_query.log
Task step logs oms-step.log
Background scheduling logs oms-scheduler.log

Full migration

Type
Description
Component Connector
Log directory /home/ds/run/{Component ID}/logs
Error logs error.log
Program execution logs connector.log

To view the component ID, perform the following steps:

  1. Log in to the OMS Community Edition console.

  2. In the left-side navigation pane, click Data Migration.

  3. On the Data Migration page, click the name of the target data migration task to go to its details page.

  4. Click View Component Monitoring in the upper-right corner.

    FAQ-2

  5. In the View Component Monitoring dialog box, view the Component ID of the Full-Import component for full migration.

    FAQ-3

Incremental synchronization

Incremental pull component Store

Type
Description
Component Store
Log directory /home/ds/store/store{port}/log
obstore (source database is V3.x) liboblog.log
obstore (source database is V4.x) libobcdc.log
mysqlstore (Java-based xlog) connector/connector.log

To view store{port}, perform the following steps:

  1. Log in to the OMS Community Edition console.

  2. In the left-side navigation pane, click Data Migration.

  3. On the Data Migration page, click the name of the target data migration task to go to its details page.

  4. Click View Component Monitoring in the upper-right corner.

    FAQ-2

  5. In the View Component Monitoring dialog box, view the Component ID of the Store component for incremental log pulling.

    The component ID is in the {ip}-{port}:{subtopic}:{seq} format. You can obtain the {port} of the Store component from the component ID.

    FAQ-4

Incremental synchronization component Incr-Sync

Type
Description
Component Incr-Sync
Log directory /home/ds/run/{Component ID}/logs
Error logs error.log
Program execution logs connector.log
Incremental source data (only primary keys) msg/connector_source_msg.log
Incremental sink data (only primary keys) msg/connector_sink_msg.log
Incremental filtered data msg/connector_filter_msg.log

Full verification

Type
Description
Component Full-Verification
Log directory /home/ds/run/{Component ID}/logs
Error logs error.log
Program execution logs task.log
Verification result file directory /home/ds/run/{Component ID}/verify/{subid}/
Inconsistent data and reasons /home/ds/run/{Component ID}/verify/{subid}/{schema}/diff/{table_name}.diff
Corrective SQL files that can be executed on the target side /home/ds/run/{Component ID}/verify/{subid}/{schema}/sql/{table_name}.sql

{subid}: starts from 1 and increments by 1 each time a verification is performed.

Forward switchover

Forward switchover is performed by the control component. If you select reverse incremental synchronization, OMS Community Edition creates a reverse Store component and a reverse incremental synchronization component.

Type
Description
Component Ghana
Log directory /home/admin/logs/ghana/Ghana
General error logs common-error.log
General output logs common-default.log
Migration workflow step logs oms-step.log
Background scheduling logs oms-scheduler.log

Reverse incremental synchronization

The only difference is the naming of the component ID. The reverse incremental synchronization component ID contains the reverse keyword.

Control components

Component
Description
oms_console The Ghana component, whose log directory is /home/admin/logs/ghana/Ghana.
oms_drc_cm The CM component, whose log directory is /home/admin/logs/cm.
oms_drc_supervisor The Supervisor component, whose log directory is /home/admin/logs/supervisor.

Installation issues

Log in to the OMS Community Edition container and check whether the OMS Community Edition components are working properly. If any component is not working properly, check the relevant logs.

supervisorctl status

During the installation phase, the following issues may occur:

  • The port is occupied.

  • The permissions of the metadata database provided to OMS Community Edition are incorrect.

  • The Docker environment on some operating systems may display file permissions as ???, preventing the service from starting. In this case, install OMS Community Edition on a different operating system.

  • The host uses cgroup v2, causing the OMS Community Edition host status to be abnormal. This issue is resolved in OMS Community Edition V4.2.4 and later.

Full migration and incremental synchronization performance tuning

For more information, see Full migration and incremental synchronization performance tuning.

Concurrency, JVM memory, and number of records per shard

This section provides solutions to most performance issues.

Issue
Solution
Concurrency Set the source concurrency by using source.workerNum and the destination concurrency by using sink.workerNum. During full migration, the source and destination concurrency values are usually the same. You do not need to configure source concurrency for incremental synchronization.
The concurrency is related to the number of CPU cores and can be set to at most four times the number of CPU cores. You must also check whether other migration tasks are running on the same server.
JVM memory coordinator.connectorJvmParam. Adjust -Xms8g (initial heap size), -Xmx8g (maximum heap size), and -Xmn4g (young generation size). Follow these rules:
  • Initial heap size = Maximum heap size
  • Young generation size = Maximum heap size - 4 GB
  • Typically, allocate 1 GB of memory for each concurrent worker. For example, for a concurrency of 32, set the maximum heap size to 32 GB.
Number of records per shard source.sliceBatchSize, default value is 600.
For large tables, 10000 is usually sufficient. If you set a very large value, it will consume a lot of memory. You can decide whether to modify it based on the slice_queue in logs/msg/metrics.log. If it is 0, you need to increase the number of records per shard. This is because the Source Worker thread will pull shards from slice_queue. If slice_queue is 0, it means there are no shards, and the Source Worker thread will wait idly.

To improve full migration performance, create indexes after the full migration whenever possible. When OceanBase Database is the destination, configure the index creation concurrency by using ob.parallel in the struct.transfer.config system parameter.

Incremental synchronization

Transaction splitting is controlled by source.splitThreshold. You can adjust this parameter when batch operations cause incremental synchronization latency. The default value is 128. For batch INSERT operations, use a larger value, up to 512. For batch UPDATE and DELETE operations, use a smaller value, down to 1.

metrics.log analysis

Identify the bottleneck

The data flow is: slice generation -> Source reads from the source -> Dispatcher distributes records -> Sink writes to the destination.

  • If slice_queue is greater than 0, the bottleneck is not here. If slice_queue is 0, it indicates slow sharding. Increase source.sliceBatchSize to increase the number of records per shard. In multi-table scenarios, you can also increase source.sliceWorkerNum to add shard worker threads.

  • If source_worker_num is less than source_worker_num_all, the bottleneck is not in the source reading.

  • If sink_worker_num is less than sink_worker_num_all, the bottleneck is not in the sink writing.

  • If dispatcher.ready_execute_batch_size is 0, there is no bottleneck in writing. If ready_execute_batch_size is greater than 0, the writing is slow.

  • If dispatcher.wait_dispatch_record_size is 0, data dispatch is not a bottleneck. If wait_dispatch_record_size is greater than 0, OMS is experiencing a bottleneck when calculating the destination partition for each record. Backlogs are common for partitioned tables because partition calculation is time-consuming. In Direct Load scenarios, you can disable partition calculation by setting sink.enablePartitionBucket=false. Hotspot data may also cause a backlog. For more information, see Suspected hotspot issues.

  • If the JVM memory is insufficient, full GC may occur, significantly reducing efficiency and causing database disconnection errors that are easy to misinterpret. You can log in to the OMS Community Edition container to check the GC status of the process.

  • If the source is performing bulk operations, it is recommended to control the bulk operation traffic.

    su - ds
    ps -ef|grep "Component ID"
    
    /opt/alibaba/java/bin/jstat -gcutil {pid} 1s
    S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT
    0.00  18.27  64.08   0.90  97.11  93.45      7    0.374     0    0.000    0.374
    0.00  18.27  64.08   0.90  97.11  93.45      7    0.374     0    0.000    0.374
    

    If FGC keeps increasing, it indicates that the JVM memory needs to be increased.

    
    {
        "jvm": {
            "JVM": "{\"heapMemoryMax\":7782,\"heapMemoryInit\":8192,\"heapMemoryUsed\":1072,\"heapMemoryCommitted\":7782,\"noHeapMemoryMax\":0,\"noHeapMemoryInit\":2,\"noHeapMemoryUsed\":78,\"noHeapMemoryCommitted\":83,\"gcInfoList\":[{\"name\":\"ParNew\",\"count\":6,\"costMs\":770},{\"name\":\"ConcurrentMarkSweep\",\"count\":1,\"costMs\":362}],\"threadCount\":34}"
        },
        "dataflow": {
            "slice_queue": 0
        },
        "os": {
            "OS": "{\"cpu\":0.5210029306414848,\"sysCpu\":62.941847206385404}"
        },
        "sink": {
            "sink_worker_num": 0,
            "ob_watermark_detect_times": 231,
            "sink_request_time": 198.43,
            "source_iops": 0.0,
            "sink_total_transaction": 2384.0,
            "ob_exceed_mem_high_watermark_times": 0,
            "sink_total_record": 23383.0,
            "paused_time_ms": 0.0,
            "sink_commit_time": 3363.16,
            "sink_worker_num_all": 8,
            "shardTime": 0.0,
            "sink_total_bytes": 8739678.0,
            "sink_delay": 1717642529661,
            "paused_total_time_ms": 0.0,
            "ob_free_memory": 92,
            "rps": 41.42,
            "tps": 3.1,
            "ob_exceed_cpu_high_watermark_times": 0,
            "iops": 3921.59,
            "sinkSlowRoutes": "",
            "sink_execute_time": 17.25,
            "ob_free_cpu": -1
        },
        "source": {
            "source_read_time": 0.0,
            "source_rps": 0.0,
            "source_slice_time": 0.0,
            "source_worker_num_all": 8,
            "source_worker_num": 0
        },
        "dispatcher": {
            "wait_dispatch_record_size": 0,
            "ready_execute_batch_size": 0
        },
        "frame": {
            "SourceTaskManager.createdSourceSize": 0,
            "queue_slot1.batchAccumulate": 0,
            "frame.throttle.throttle_memory_remain": "2.14748365E9",
            "queue_slot1.batchCount": 3715.0,
            "queue_slot1.tps": 0.0
        }
    }
    

Incremental latency: suspected hotspot issue

For more information, see Suspected hotspot issues.

Full verification data issues

FAQ-5

How to dump data from Store

#checkpoint is a Unix timestamp
#17006 and p_47qaxxxu8_source-000-0 are shown in the image below
#You can locate specific data based on the table name, time, and field content
wget 'localhost:17006/p_47qaxxxsu8_source-000-0' --post-data 'filter.conditions=*.*.*&checkpoint=1667996779'

FAQ-6

Typical use cases and features

Multi-table aggregation

The following example shows how to aggregate sharded source tables into a single table or partitioned table in the destination database:

-- Source tables, primary key ID, and unique key (UK) field uk_id
CREATE TABLE test_01(id bigint not null AUTO_INCREMENT,uk_id bigint not null,...);
CREATE TABLE test_02(id bigint not null AUTO_INCREMENT,uk_id bigint not null,...);

-- Destination table
CREATE TABLE test(id_new bigint not null AUTO_INCREMENT,uk_id bigint not null,...,
                 PRIMARY KEY (id_new,uk_id),
                 unique key(uk_id))
PARTITION BY HASH(uk_id)
PARTITIONS 4
;

Common issues include:

  • When you create a data migration task, the source tables are renamed in batches.

    • You can use Matching Rules to configure this.

    • You can also use the configuration src_schema.test_*=dst_schema.test.

  • The ID field in the source database is an auto-increment field and is duplicated in multiple tables. In the destination table, the new field name is used as the auto-increment primary key.

    • The ID field in the source tables does not need to be migrated to the destination table. The id_new field in the destination table is a new auto-increment column.

    • When you perform a full migration, you need to set the parameter sink.ignoreRedunantColumnsReplicate=true. The ID field will be ignored during the full migration.

    • When you perform an incremental synchronization, you need to set sink.ignoreRedunantColumnsReplicate=true to ignore the ID field.

  • The destination table is a partitioned table. In OceanBase Database, the primary key (PK) field must include the partitioning field. How can you verify the data?

    • When you perform a full verification, set task.sourceMasterSection.matchAllColumn=false. The ID field in the source table will not be involved in the verification. In this case, the source table must have a unique key (UK) that cannot be NULL. Otherwise, the verification cannot be performed.

    • For full verification, configure inmod mode by setting filter.verify.inmod.tables=.*;.*;.*. For more information, see Full-Verification component parameters.

Hidden columns used to migrate OceanBase tables without primary keys

When OceanBase Database Community Edition is the source, OMS Community Edition uses the hidden column __pk_increment as the primary key when migrating tables that are not managed by middleware and do not have primary keys. During schema migration, OMS Community Edition adds an OMS_PK_INCRMT column to the destination table.

  • If you perform a forward switchover, the OMS_PK_INCRMT column is eventually deleted.

  • If you do not perform a forward switchover and then use the destination database as the source database of another task, an error occurs. Manually delete the OMS_PK_INCRMT column to prevent this error.

OceanBase Direct Load

In addition to the commonly used concurrency parameter, you can also set the sink.serverParallel parameter for direct load performance. The default value is 8. This parameter affects the number of working threads and concurrency used by OceanBase Database for direct load tasks.

Reverse incremental migration

If you require rollback capability or want to use the original database as a standby database, we recommend that you select Reverse Incremental Migration when creating the data migration task. If MySQL is the source database, for example, in a MySQL-to-OceanBase Database Community Edition task, manually create the omstxndb transaction database in MySQL. Otherwise, OMS Community Edition reports that the omstxndb database does not exist.

Active-active disaster recovery

If your application requires dual writes or a phased switchover, you can use the active-active disaster recovery feature of OMS Community Edition. This feature supports MySQL-to-OceanBase Database Community Edition and OceanBase Database Community Edition-to-OceanBase Database Community Edition scenarios. OMS Community Edition automatically configures parameters that prevent replication loops. In an active-active disaster recovery scenario, every table must have a primary key (PK) or unique key (UK).

  1. There are two databases, A and B.

  2. The application writes data to database A and database B according to certain rules.

    In non-dual-write mode, data written to database A will not be written to database B, and data written to database B will not be written to database A.

  3. Database A and database B must retain all data from the application.

FAQ-7

Full verification

There are two modes for full verification:

  • Default mode: Both the source and destination databases use shard range queries.

  • Inmod mode: The source database uses shard range queries, and the destination database uses the primary key (PK) or unique key (UK) from the source database to query the destination data. The configuration parameter is filter.verify.inmod.tables.

    Here are some examples:

    • To configure all tables in the current task to use inmod verification: filter.verify.inmod.tables=.*;.*;.*

    • To configure the T1 table in the D1 database to use inmod verification: filter.verify.inmod.tables=D1;T1;.*

    • To configure the T1 and T2 tables in the D1 database to use inmod verification: filter.verify.inmod.tables=D1;T1;.*|D1;T2;.*

    • To configure the T1 and T2 tables in the D1 database and the T3 and T4 tables in the D2 database to use inmod verification: filter.verify.inmod.tables=D1;T1;.*|D1;T2;.*|D2;T3;.*|D2;T4;.*

System views used by OMS Community Edition to select tables and views during task creation

MySQL

System tables

Table/View
Description
information_schema.SCHEMATA Schema information
information_schema.tables Table information
information_schema.columns Field information
information_schema.STATISTICS Index information

SQL query

SET TIME_ZONE='%s';
SET sql_mode='';
SET names 'utf8mb4';
SET foreign_key_checks = off;
SELECT version();
SELECT 1;
-- Query all schemas
SELECT CATALOG_NAME, SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME, SQL_PATH
FROM `information_schema`.`SCHEMATA`
-- Query all tables
SELECT NULL,TABLE_SCHEMA,TABLE_NAME,TABLE_ROWS, TABLE_COLLATION, ENGINE
FROM information_schema.tables WHERE TABLE_TYPE='BASE TABLE' AND TABLE_SCHEMA NOT IN('mysql','information_schema','performance_schema')
-- Query the database engine information of the table
SELECT `ENGINE` FROM `information_schema`.`tables` WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'
-- Query the character set of the table
SELECT TABLE_COLLATION FROM information_schema.tables WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'
-- Query field information
SELECT `COLUMN_NAME` ,upper(`COLUMN_TYPE`) ,`CHARACTER_MAXIMUM_LENGTH` ,`NUMERIC_PRECISION`,`NUMERIC_SCALE`
FROM information_schema.columns WHERE table_schema=? AND table_name=? ORDER BY ORDINAL_POSITION ASC
-- Query all views
SELECT TABLE_NAME, TABLE_SCHEMA, VIEW_DEFINITION FROM information_schema.views
WHERE TABLE_SCHEMA IN ('xx');
-- For MySQL 5.7 and later
-- Only query normal columns, excluding generated columns
SELECT `COLUMN_NAME` ,upper(`COLUMN_TYPE`) ,`CHARACTER_MAXIMUM_LENGTH` ,`NUMERIC_PRECISION`,`NUMERIC_SCALE`
FROM information_schema.columns WHERE table_schema=? AND table_name=? AND (GENERATION_EXPRESSION='' or GENERATION_EXPRESSION is null) ORDER BY ORDINAL_POSITION ASC
-- Indexes
SELECT INDEX_NAME,NON_UNIQUE,SEQ_IN_INDEX,COLUMN_NAME,SUB_PART FROM information_schema.STATISTICS WHERE table_schema=? AND table_name=?
AND concat(index_schema,'.',index_name) NOT IN (
SELECT concat(index_schema,'.',index_name) FROM information_schema.STATISTICS
WHERE table_schema=? AND table_name=? AND upper(nullable)='YES')
ORDER BY INDEX_NAME ASC, SEQ_IN_INDEX ASC
-- Query partitions
SELECT TABLE_SCHEMA, TABLE_NAME,PARTITION_NAME,SUBPARTITION_NAME,PARTITION_METHOD,PARTITION_EXPRESSION,SUBPARTITION_METHOD,SUBPARTITION_EXPRESSION
FROM information_schema.PARTITIONS
-- View constraints
SELECT  REFERENCED_TABLE_SCHEMA, REFERENCED_TABLE_NAME, TABLE_SCHEMA, TABLE_NAME, CONSTRAINT_NAME,REFERENCED_COLUMN_NAME, COLUMN_NAME FROM information_schema.KEY_COLUMN_USAGE

MySQL tenant of OceanBase Database

System tables

Table/view
Description
information_schema.SCHEMATA Schema information
information_schema.tables Table information
information_schema.columns Field information
information_schema.STATISTICS Index information
information_schema.PARTITIONS Partition information
oceanbase.gv$memstore Memory usage information
oceanbase.gv$sysstat CPU usage information
oceanbase.gv$table tableid
oceanbase.__tenant_virtual_table_index Index
The following system tables are required for macroblock slicing.
oceanbase.__all_tenant Tenant information
oceanbase.__all_database Database information for versions earlier than 20200
oceanbase.__all_table Table information for versions earlier than 20200
oceanbase.__all_part Partition information for versions earlier than 20200
oceanbase.__all_meta_table Metadata information of tables for versions earlier than 20200
oceanbase.__all_virtual_database Database information for versions later than 20200
oceanbase.__all_virtual_table Table information for versions later than 20200
oceanbase.__all_virtual_proxy_partition Partition information for versions later than 20200
oceanbase.__all_meta_table Metadata information of tables for versions later than 20200
oceanbase.__all_virtual_partition_item Subpartition information
oceanbase.__all_virtual_partition_sstable_macro_info Macroblock information table

Note

Macroblock information is queried in the sys tenant.

SQL query

-- Query all schemas
SELECT CATALOG_NAME, SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME, SQL_PATH
FROM `information_schema`.`SCHEMATA`
-- Query all tables
SELECT NULL,TABLE_SCHEMA,TABLE_NAME,TABLE_ROWS, TABLE_COLLATION, ENGINE
FROM information_schema.tables WHERE TABLE_TYPE='BASE TABLE' AND TABLE_SCHEMA NOT IN('mysql','information_schema','performance_schema')
-- Query the database engine information of the table
SELECT `ENGINE` FROM `information_schema`.`tables` WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'
-- Query the character set of the table
SELECT TABLE_COLLATION FROM information_schema.tables WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'
-- Query the column information
SELECT `COLUMN_NAME` ,upper(`COLUMN_TYPE`) ,`CHARACTER_MAXIMUM_LENGTH` ,`NUMERIC_PRECISION`,`NUMERIC_SCALE`
FROM information_schema.columns WHERE table_schema=? AND table_name=? ORDER BY ORDINAL_POSITION ASC
-- Query the records after 5.7
-- Query only the normal columns, excluding generated columns
SELECT `COLUMN_NAME` ,upper(`COLUMN_TYPE`) ,`CHARACTER_MAXIMUM_LENGTH` ,`NUMERIC_PRECISION`,`NUMERIC_SCALE`
FROM information_schema.columns WHERE table_schema=? AND table_name=? AND (GENERATION_EXPRESSION='' or GENERATION_EXPRESSION is null) ORDER BY ORDINAL_POSITION ASC
-- Query the index information
SELECT INDEX_NAME,NON_UNIQUE,SEQ_IN_INDEX,COLUMN_NAME,SUB_PART FROM information_schema.STATISTICS WHERE table_schema=? AND table_name=?
AND concat(index_schema,'.',index_name) NOT IN (
SELECT concat(index_schema,'.',index_name) FROM information_schema.STATISTICS
WHERE table_schema=? AND table_name=? AND upper(nullable)='YES')
ORDER BY INDEX_NAME ASC, SEQ_IN_INDEX ASC
-- Query the partition information
SELECT PARTITION_NAME,SUBPARTITION_NAME FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA='{}' AND TABLE_NAME='{}'
-- Query the partition expression
SELECT DISTINCT PARTITION_EXPRESSION,SUBPARTITION_EXPRESSION FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA=? AND TABLE_NAME=?
-- The following SQL queries the macro block information from the __all_virtual_partition_sstable_macro_info table.
-- Query the tenant information
SELECT tenant_id FROM oceanbase.__all_tenant WHERE tenant_name = '%s'
-- Query the index information of the table
SELECT  key_name, NON_UNIQUE,SEQ_IN_INDEX,COLUMN_NAME,`null` nullable FROM oceanbase.__tenant_virtual_table_index WHERE table_id = ?
-- Query the table ID
-- For versions before 20200
SELECT %s b.table_id FROM oceanbase.__all_database a, oceanbase.__all_table b WHERE a.database_id = b.database_id AND a.tenant_id = %d AND a.database_name = '%s' AND b.table_name = '%s'
-- For versions after 20200
SELECT %s b.table_id FROM oceanbase.__all_virtual_database a, oceanbase.__all_virtual_table b WHERE a.database_id = b.database_id AND a.tenant_id = %d AND a.database_name = '%s' AND b.table_name = '%s'
-- Query the partition information
-- For versions before 20200
SELECT %s part_id,part_name FROM oceanbase.__all_part WHERE table_id = %d AND part_name IS NOT NULL AND part_name<>''
-- For versions after 20200
SELECT %s part_id,part_name FROM oceanbase.__all_virtual_proxy_partition WHERE table_id = %d AND part_name IS NOT NULL AND part_name<>''
-- Query the subpartition information
SELECT %s partition_id,case when subpart_name is null then concat(part_name,'sp',subpart_id) ELSE subpart_name END subpart_name FROM oceanbase.__all_virtual_partition_item WHERE table_id = %d AND partition_level>1
-- Query the table ID
SELECT table_id FROM oceanbase.gv$table WHERE database_name=? AND table_name=?
-- Query the macro block information. store_type=1 indicates normal data, and store_type=4 indicates data that is being dumped.
-- For versions before 20200
SELECT %s partition_id OMS_PARTITION_ID,data_seq OMS_DATA_SEQ,macro_range OMS_MACRO_RANGE,row_count OMS_ROW_COUNT FROM oceanbase.__all_virtual_partition_sstable_macro_info
WHERE tenant_id=%d AND table_id = %d AND store_type=1 AND macro_range NOT LIKE '%%]always true' AND macro_range<>'(MIN ; MAX]' AND macro_range LIKE '%%]'
AND (svr_ip,svr_port,partition_id) IN (SELECT svr_ip, svr_port,partition_id FROM oceanbase.__all_meta_table
WHERE tenant_id=%d AND table_id = %d AND ROLE = 1)
ORDER BY partition_id,data_seq
-- For versions later than 20200
SELECT %s partition_id OMS_PARTITION_ID,data_seq OMS_DATA_SEQ,macro_range OMS_MACRO_RANGE,row_count OMS_ROW_COUNT FROM oceanbase.__all_virtual_partition_sstable_macro_info
WHERE tenant_id=%d AND table_id = %d AND store_type=1 AND macro_range NOT LIKE '%%]always true' AND macro_range<>'(MIN ; MAX]' AND macro_range LIKE '%%]'
AND (svr_ip,svr_port,partition_id) IN (SELECT svr_ip, svr_port,partition_id FROM oceanbase.__all_virtual_meta_table
WHERE tenant_id=%d AND table_id = %d AND ROLE = 1)
ORDER BY partition_id,data_seq
-- Memory protection
SELECT /*+query_timeout(5000000)*/ total, freeze_trigger,mem_limit FROM oceanbase.gv$memstore
-- CPU protection
SELECT min(100-round(cpu_usage.value * 100 / cpu_limit.value)) cpu_free_percent
FROM oceanbase.gv$sysstat cpu_usage, oceanbase.gv$sysstat cpu_limit
WHERE cpu_usage.name = 'cpu usage' AND cpu_limit.name = 'max cpus'
AND cpu_usage.svr_ip = cpu_limit.svr_ip

Previous topic

FAQ
Last

Next topic

How do I modify the resource quotas of an OMS container?
Next
on this page
Troubleshooting approach
Product features, components, and log locations
Schema migration
Full migration
Incremental synchronization
Full verification
Forward switchover
Reverse incremental synchronization
Control components
Installation issues
Full migration and incremental synchronization performance tuning
Concurrency, JVM memory, and number of records per shard
Incremental synchronization
metrics.log analysis
Incremental latency: suspected hotspot issue
Full verification data issues
How to dump data from Store
Typical use cases and features
Multi-table aggregation
Hidden columns used to migrate OceanBase tables without primary keys
OceanBase Direct Load
Reverse incremental migration
Active-active disaster recovery
Full verification
System views used by OMS Community Edition to select tables and views during task creation
MySQL
MySQL tenant of OceanBase Database