This topic describes the FAQ and considerations of OceanBase Change Data Capture (obcdc).
How can I judge whether the startup timestamp is too small?
obcdc allows you to configure a log-pulling point in time. obcdc will pull logs that are committed later than this point in time, which is referred to as the startup timestamp.
Considerations
- obcdc supports cluster-level synchronization among tenants. When logs are synchronized in the entire cluster, make sure that the clocks on all servers are synchronized. Significant Global Timestamp Service (GTS) time difference between the tenants will cause obcdc to exit due to the rollback of a security timestamp. We recommend that you use obcdc V4.x to synchronize data of only one tenant at a time.
- At present, obcdc does not support synchronizing data of a cluster that has a standby tenant.
- Logs can be consumed offline only when
fetching_log_modeis set todirectandmeta_data_refresh_modeis set todata_dict. In other cases, obcdc must send requests to the OBServer node to pull logs, and you must configure the parameters to access the OBServer node, such ascluster_urlorrootserver_list.
Limitations for startup timestamps
When obcdc pulls data of a single tenant, if the pulling timestamp is too small, obcdc may fail to start. The following limitations apply.
Startup timestamp limitations for synchronizing the data of a single tenant
When
fetching_log_modeis set tointegrated, the limitations differ in the following cases:Archiving is disabled
The startup timestamp specified for obcdc must be greater than the largest
BEGIN_SCNvalue of all log streams of the tenant. You can execute the following SQL statement to query this system change number (SCN):SELECT CEIL(MAX(BEGIN_SCN)/1000) AS START_TS_US FROM oceanbase.GV$OB_LOG_STAT;Archiving is enabled
The pulling timestamp specified for obcdc must be smaller than the smaller of the following two values:
The largest
BEGIN_SCNvalue of all log streams of the tenant.The value of
START_SCN, which indicates the time when archiving is enabled for the tenant. You can execute the following SQL statement in a tenant to query the time when archiving is enabled for the tenant:SELECT CEIL(MAX(START_SCN)/1000) as START_TS_US FROM oceanbase.DBA_OB_ARCHIVELOG;
When
fetching_log_modeis set todirect, obcdc can synchronize the data of only a single tenant. Make sure that the startup time of obcdc is later than the point in time when log archiving is enabled.To use data dictionaries, make sure that the startup time is greater than the smallest
snapshot_scnvalue in the data dictionaries of the tenant. You can execute the following statement in a tenant to query the smallestsnapshot_scnvalue in the data dictionaries of the tenant.SELECT CEIL(MIN(snapshot_scn)/1000) FROM oceanbase.DBA_OB_DATA_DICTIONARY_IN_LOG;Note
You can also specify
tenant_idin the sys tenant to query theoceanbase.CDB_OB_DATA_DICTIONARY_IN_LOGoroceanabse.__all_virtual_data_dictionary_in_logview.
Startup timestamp limitations for synchronizing the data of multiple tenants
When you pull the data of multiple tenants in a cluster, make sure that each tenant meets the preceding conditions regarding the startup timestamp specified for obcdc.