Skip to main content

Feature Details

The Cross Cluster Replication (CCR) feature in Apache Doris efficiently synchronizes data between multiple Doris clusters. It is commonly used for remote disaster recovery, read/write separation, and business continuity scenarios. This document lists the Doris operations supported by CCR, the corresponding sync methods, and the minimum version requirements, organized by Database / Table / Data / Partition / View / Materialized View / Others. Use it to quickly verify compatibility before setting up a CCR job.

Applicable Scenarios

ScenarioDescription
Before setting up a CCR jobVerify whether the upstream and downstream Doris versions cover the sync capabilities of the target objects (databases, tables, partitions, views, etc.)
Planning upstream and downstream clustersConfirm which table properties, column operations, and partition operations can be synchronized automatically by CCR
Troubleshooting CCR job exceptionsCompare against the list of unsupported or restricted operations to determine whether the exception is caused by an incompatible operation
Upgrading a Doris clusterEvaluate the additional sync capabilities introduced after upgrading to versions such as 2.0.15, 2.1.6, 2.1.8, or 3.0.4

Reading Notes

note
  1. In the Doris Version column, - means the feature is supported by Doris 2.0 and later, and by all CCR versions. Doris 2.0.15, 2.1.6, or later is recommended.
  2. The version requirements between CCR Syncer and Doris are: Syncer Version >= downstream Doris Version >= upstream Doris Version. Therefore, the upgrade order is: upgrade the Syncer first, then the downstream Doris, and finally the upstream Doris.
  3. CCR does not currently support the storage-compute separation mode.

Sync Method Terminology

CCR uses the following methods to synchronize upstream changes to the downstream. The "Sync Method" column in the tables below uses these terms:

Sync MethodMeaning
Full SyncA full synchronization. The downstream re-fetches a complete copy of the data based on an upstream snapshot.
Partial SyncA partial synchronization. Only changed objects or partitions are synced, avoiding a full sync.
SQLThe DDL/DML SQL statements executed upstream are replayed on the downstream.
TXNUpstream transactions are synchronized through the transaction records in the binlog. The downstream starts syncing after the transaction becomes visible upstream.

Database

Database Properties

For a database-level job, database properties are synchronized during Full Sync.

PropertySupportedDoris versionSync MethodDescription
replication_allocationYes-Full Sync
data quotaNo
replica quotaNo

Modifying Database Properties

A CCR job does not synchronize operations that modify database properties.

PropertySupportedCan operate upstreamCan operate downstreamDescription
replication_allocationNoNoNoOperating independently on either side interrupts the CCR job
data quotaNoYesYes
replica quotaNoYesYes

Renaming Databases

Renaming is not supported on either the upstream or the downstream. If you do rename, views may stop working.

Table

Table Properties

PropertySupportedDoris versionSync MethodDescription
Table model (duplicate, unique, aggregate)Yes-SQL
Partitioning and bucketingYes-SQL
replication_numYes-SQL
replication_allocation (resource group)Yes-SQLThe upstream must be consistent with the downstream, and BE tags must match, otherwise the CCR job fails
colocate_withNo
storage_policyNo
dynamic_partitionYes-SQL
storage_mediumYes-SQL
auto_bucketYes-SQL
group_commit seriesYes-SQL
enable_unique_key_merge_on_writeYes-SQL
enable_single_replica_compactionYes-SQL
disable_auto_compactionYes-SQL
compaction_policyYes-SQL
time_series_compaction seriesYes-SQL
binlog seriesYes-SQL
variant_enable_flatten_nestedYes-SQL
skip_write_index_on_loadYes-SQL
row_store seriesYes-SQL
seq columnYes-SQL
enable_light_schema_changeYes-SQL
compression_typeYes-SQL
indexYes-SQL
bloom_filter_columnsYes-SQL
bloom_filter_fppYes
storage_cooldown_timeNo
generated columnYes-SQL
auto-increment idNoHas issues

Basic Table Operations

OperationSupportedDoris versionSync MethodCan operate downstream independentlyDescription
create tableYes-SQL / Partial SyncOperating on tables synced by a CCR job is not supported.See the table-creation section for properties. SQL sync is used in most cases. Partial Sync is used in specific cases, for example when certain session variables are enabled at table creation or the CREATE TABLE statement contains an inverted index.
drop tableYes-SQL / Full SyncSame as aboveBefore 2.0.15 / 2.1.6: Full Sync. After: SQL.
rename tableNot supported for table-level jobs, supported for database-level jobs2.1.8 / 3.0.4SQLSame as aboveExecuting rename in a table-level job stops the CCR job.
replace tableYes2.1.8 / 3.0.4SQL / Full SyncSame as aboveAt the database level, SQL sync is used. At the table level, a full sync is triggered.
truncate tableYes-SQLSame as above
restore tableNoSame as above

Modifying Table Properties

The sync method is SQL.

PropertySupportedDoris versionCan operate upstreamCan operate downstreamDescription
colocateNoYesNo. Triggers Full Sync, and downstream changes are lost.
distribution typeNoNoSame as above
dynamic partitionNoYesSame as above
replication_numNoNoNo
replication_allocationNoNo
storage policyNoNoNo
enable_light_schema_changeNoCCR can only synchronize tables with light schema change
row_storeYes2.1.8 / 3.0.4Via Partial Sync
bloom_filter_columnsYes2.1.8 / 3.0.4Via Partial Sync
bloom_filter_fppYes2.1.8 / 3.0.4Via Partial Sync
bucket numNoYesNo. Triggers Full Sync, and downstream changes are lost.
isBeingSyncedNoNoNo
compaction series propertiesNoYesNo. Triggers Full Sync, and downstream changes are lost.
skip_write_index_on_loadNoYesSame as above
seq columnYes-YesNo. Triggers Full Sync, and downstream changes are lost.
delete sign columnYes-YesSame as above
commentYes2.1.8 / 3.0.4YesNo. Triggers Full Sync, and downstream changes are lost.

Column Operations

Column operations on the Base Index of a table:

OperationSupportedDoris versionSync MethodCan operate downstreamNotes
add key columnYes-Partial SyncNo. Interrupts the CCR job.
add value columnYes-SQLNo. Interrupts the CCR job.
drop key columnYes-Partial SyncSame as above
drop value columnYes-SQLSame as above
modify columnYes-Partial SyncSame as above
order byYes-Partial SyncSame as above
renameYes2.1.8 / 3.0.4SQLSame as above
commentYes2.1.8 / 3.0.4SQLSame as above
note

add/drop value column requires the property "light_schema_change" = "true" to be set at table creation.

Column operations on a Rollup Index of a table:

OperationSupportedDoris VersionSync MethodNotes
add key columnYes2.1.8 / 3.0.4Partial Sync
add value columnYes2.1.8 / 3.0.4SQLRequires light schema change to be enabled
drop columnYes2.1.8 / 3.0.4Partial Sync
modify columnUnknown2.1.8 / 3.0.4Partial SyncDoris does not support directly modifying the type of a rollup column
order byYes2.1.8 / 3.0.4Partial Sync

Rollup

OperationSupportedDoris VersionSync MethodNotes
add rollupYes2.1.8 / 3.0.4Partial Sync
drop rollupYes2.1.8 / 3.0.4SQL
rename rollupYes2.1.8 / 3.0.4SQL

Index

Inverted Index:

OperationSupportedDoris VersionSync MethodNotes
create indexYes2.1.8 / 3.0.4Partial Sync
drop indexYes2.1.8 / 3.0.4SQL
build indexYes2.1.8 / 3.0.4SQL

Bloom Filter:

OperationSupportedDoris VersionSync MethodNotes
add bloom filterYes2.1.8 / 3.0.4Partial Sync
alter bloom filterYes2.1.8 / 3.0.4Partial SyncRefers to modifying bloom_filter_columns
drop bloom filterYes2.1.8 / 3.0.4Partial Sync

Data

Loading

Load MethodSupportedDoris versionSync MethodCan operate downstreamDescription
stream loadYes (except for temporary partitions)-TXNNo. If you load on the downstream, the downstream-loaded data is lost when a Full Sync or Partial Sync is triggered later.When the upstream transaction becomes visible (that is, when the data becomes visible), a binlog is generated and the downstream starts syncing.
broker loadYes (except for temporary partitions)-TXNSame as aboveSame as above
routine loadYes (except for temporary partitions)-TXNSame as aboveSame as above
mysql loadYes (except for temporary partitions)-TXNSame as aboveSame as above
group commitYes (except for temporary partitions)2.1TXNSame as aboveSame as above

Data Operations

OperationSupportedDoris versionSync MethodCan operate downstreamDescription
deleteYes-TXNNo. If you operate on the downstream, the downstream changes are lost when a Full Sync or Partial Sync is triggered later.When the upstream transaction becomes visible (that is, when the data becomes visible), a binlog is generated and the downstream starts syncing.
updateYes-TXNSame as aboveSame as above
insertYes-TXNSame as aboveSame as above
insert into overwriteYes (except for temporary partitions)2.1.6Partial SyncSame as aboveSame as above
insert into overwriteYes (except for temporary partitions)2.0Full SyncSame as aboveSame as above
Explicit transactions (3.0) begin commitNo

Partition Operations

OperationSupportedDoris versionSync MethodCan operate downstream independentlyDescription
add partitionYes-SQLNo. A subsequent Full Sync or Partial Sync causes downstream changes to be lost.The behavior of the cooldown time property is unknown.
add temp partitionNoSame as aboveBackup does not support tmp partition. From Doris 2.1.8 / 3.0.4, you can work around this by modifying the upstream FE configuration: ignore_backup_tmp_partitions.
drop partitionYes-SQL / Full SyncSame as aboveBefore 2.0.15 / 2.1.6: Full Sync. After: SQL.
replace partitionYes2.1.7 / 3.0.3Partial SyncSame as abovePartial Sync only supports the replace mode with strict range and non-tmp partition. Otherwise, a Full Sync is triggered.
modify partitionNoSame as aboveRefers to modifying the property of a partition.
rename partitionYes2.1.8 / 3.0.4SQLSame as above

View

OperationSupportedDoris versionSync MethodNotes
create viewYes-SQLWorks when the upstream and downstream names are the same. If the view already exists on the downstream, it is dropped first and then recreated.
alter viewYes2.1.8 / 3.0.4SQL
drop viewYes2.1.8 / 3.0.4SQL
note

Due to limitations in the Doris implementation, the column name and view name within a view cannot be the same as the database name.

Materialized View

Synchronous materialized view:

OperationSupportedDoris VersionSync MethodNotes
create materialized viewYes2.1.8 / 3.0.4Partial SyncWorks when the upstream and downstream names are the same. When the names differ, the view must be manually recreated on the downstream.
drop materialized viewYes2.1.8 / 3.0.4SQL

Asynchronous materialized view:

OperationSupported
create async materialized viewNo
alter async materialized viewNo
drop async materialized viewNo
refreshNo
pauseNo
resumeNo

Statistics

Statistics are not synchronized between the upstream and the downstream. They work independently.

Others

OperationSupported
external tableNo
recycle binNo
catalogNo
workload groupNo
jobNo
functionNo
policyNo
userNo
cancel alter jobYes