メインコンテンツまでスキップ
バージョン: 2.1

機能詳細

DorisのCross-Cluster Replication(CCR)機能は、主に複数のクラスター間で効率的にデータを同期するために使用され、それによってビジネス継続性とディザスタリカバリ機能を強化します。CCRはDorisの様々な操作をサポートし、異なるクラスター間でのデータ整合性を保証します。以下は、CCRがサポートする主要なDoris操作の詳細です。

注記
  1. Doris Versionの-は、Dorisバージョン2.0以上、CCRの全バージョンを示します。Dorisバージョン2.0.15または2.1.6以降の使用を推奨します。
  2. CCR SyncerとDorisのバージョン要件:Syncer Version >= Downstream Doris Version >= Upstream Doris Version。そのため、最初にSyncer、次にダウンストリームDoris、最後にアップストリームDorisの順でアップグレードしてください。
  3. CCRは現在、ストレージとコンピュートの分離をサポートしていません。

Database

Database Properties

データベースレベルのジョブは、Full Sync中にデータベースのプロパティを同期します。

PropertySupportedDoris VersionSync Methodデスクリプション
replication_allocationSupported-Full Sync
data quotaNot Supported
replica quotaNot Supported

Modify Database Properties

CCRジョブは、データベースプロパティを変更する操作を同期しません。

PropertySupportedCan Upstream OperateCan Downstream Operateデスクリプション
replication_allocationNot SupportedNoNo両側での操作はCCRジョブの中断を引き起こします
data quotaNot SupportedYesYes
replica quotaNot SupportedYesYes

Rename Database

アップストリームとダウンストリームでの名前変更はサポートされていません。実行した場合、ビューが動作しなくなる可能性があります。

Table

Table Properties

PropertySupportedDoris VersionSync Methodデスクリプション
Table Model (duplicate, unique, aggregate)Supported-SQL
パーティション and BucketingSupported-SQL
replication_numSupported-SQL
replication_allocation (resource group)Supported-SQLアップストリームはダウンストリームと一致している必要があり、BEタグが一致している必要があります。そうでないと、CCRジョブが失敗します
colocate_withNot Supported
storage_policyNot Supported
dynamic_partitionSupported-SQL
storage_mediumSupported-SQL
auto_bucketSupported-SQL
group_commit seriesSupported-SQL
enable_unique_key_merge_on_writeSupported-SQL
enable_single_replica_compactionSupported-SQL
disable_auto_compactionSupported-SQL
compaction_policySupported-SQL
time_series_compaction seriesSupported-SQL
binlog seriesSupported-SQL
skip_write_index_on_loadSupported-SQL
row_store seriesSupported-SQL
seq columnSupported-SQL
enable_light_schema_changeSupported-SQL
compression_typeSupported-SQL
indexSupported-SQL
bloom_filter_columnsSupported-SQL
bloom_filter_fppSupported
storage_cooldown_timeNot Supported
generated columnSupported-SQL
auto-increment idNot Supported問題があります

Basic Table 運用

OperationSupportedDoris VersionSync MethodCan Downstream Operate Independentlyデスクリプション
create tableSupported-SQL/Partial SyncCCRジョブによって同期されるTableでは操作できません。Table作成のプロパティについては、ほとんどの場合、SQL同期を使用します。ユーザーが特定のセッション変数を設定した場合や、create table文に転置インデックスが含まれている場合など、一部の操作ではpartial syncを使用します
drop tableSupported-SQL/Full Sync上記と同じ2.0.15/2.1.6以前:Full Sync、以降:SQL
rename tableTableレベルジョブはデータベースレベルジョブをサポートしません2.1.8/3.0.4SQL上記と同じTableレベルジョブの名前変更はCCRジョブの停止を引き起こします
replace tableSupported2.1.8/3.0.4SQL/Full Sync上記と同じデータベースレベル同期ではSQLを使用します。Tableレベルではフル同期をトリガーします
truncate tableSupported-SQL上記と同じ
restore tableNot Supported上記と同じ

Modify Table Properties

同期方法はSQLです。

PropertySupportedDoris VersionCan Upstream OperateCan Downstream Operateデスクリプション
colocateNot SupportedYesNoダウンストリーム操作でのフル同期のトリガーはデータ損失を引き起こします
distribution typeNot SupportedNoSame
dynamic partitionNot SupportedYesSame
replication_numNot SupportedNoNo
replication_allocationNot SupportedNo
storage policyNot SupportedNoNo
enable_light_schema_changeNot SupportedCCRは軽量スキーマ変更のみを同期できます。
row_storeSupported2.1.8/3.0.4Partial Syncを通じて
bloom_filter_columnsSupported2.1.8/3.0.4Partial Syncを通じて
bloom_filter_fppSupported2.1.8/3.0.4Partial Syncを通じて
bucket numNot SupportedYesNoダウンストリーム操作でのフル同期のトリガーはデータ損失を引き起こします
isBeingSyncedNot SupportedNoNo
compaction series propertiesNot SupportedYesNoダウンストリーム操作でのフル同期のトリガーはデータ損失を引き起こします
skip_write_index_on_loadNot SupportedYesSame
seq columnSupported-YesNoダウンストリーム操作でのフル同期のトリガーはデータ損失を引き起こします
delete sign columnSupported-YesSame
commentSupported2.1.8/3.0.4YesNoダウンストリーム操作でのフル同期のトリガーはデータ損失を引き起こします

Column 運用

Table内のBase Indexでのカラム操作。

OperationSupportedDoris VersionSync MethodCan Downstream OperateRemarks
add key columnSupported-Partial SyncNo
add value columnSupported-SQLNo
drop key columnSupported-Partial SyncSame
drop value columnSupported-SQLSame
modify columnSupported-Partial SyncSame
order bySupported-Partial SyncSame
renameSupported2.1.8/3.0.4SQLSame
commentSupported2.1.8/3.0.4SQLSame
注記

valueカラムの追加/削除には、Table作成時にプロパティ"light_schema_change" = "true"を設定する必要があります。

Table内のRollup Indexでのカラム操作。

OperationSupportedDoris VersionSync MethodRemarks
add key columnSupported2.1.8/3.0.4Partial Sync
add value columnSupported2.1.8/3.0.4SQLライトニングスキーマ変更の有効化が必要
drop columnSupported2.1.8/3.0.4Partial Sync
modify columnUnknown2.1.8/3.0.4Partial SyncDorisはrollupカラムタイプの直接変更をサポートしていません
order bySupported2.1.8/3.0.4Partial sync

Rollup

OperationSupportedDoris VersionSync MethodRemarks
add rollupSupported2.1.8/3.0.4Partial Sync
drop rollupSupported2.1.8/3.0.4SQL
rename rollupSupported2.1.8/3.0.4SQL

Index

Inverted Index

OperationSupportedDoris VersionSync MethodRemarks
create indexSupported2.1.8/3.0.4Partial Sync
drop indexSupported2.1.8/3.0.4SQL
build indexSupported2.1.8/3.0.4SQL

Bloom Filter

OperationSupportedDoris VersionSync MethodRemarks
add bloom filterSupported2.1.8/3.0.4Partial Sync
alter bloom filterSupported2.1.8/3.0.4Partial Syncこれはbloom_filter_columnsの変更を指します
drop bloom filterSupported2.1.8/3.0.4Partial Sync

Data

Import

Import MethodSupportedDoris VersionSync MethodCan Downstream Operateデスクリプション
stream loadSupported(一時パーティション除く)-TXNNo、ダウンストリームがインポートした場合、その後のフルまたはPartial Syncのトリガーがデータ損失を引き起こしますアップストリームトランザクションが可視、つまりbinlog生成時にデータが可視になると、ダウンストリームが同期を開始します。
broker loadSupported(一時パーティション除く)-TXNSameSame
routine loadSupported(一時パーティション除く)-TXNSameSame
mysql loadSupported(一時パーティション除く)-TXNSameSame
group commitSupported(一時パーティション除く)2.1TXNSameSame

Data 運用

OperationSupportedDoris VersionSync MethodCan Downstream Operateデスクリプション
deleteSupported-TXNNo、ダウンストリームが操作した場合、その後のフルまたはPartial Syncのトリガーがデータ損失を引き起こしますアップストリームトランザクションが可視、つまりbinlog生成時にデータが可視になると、ダウンストリームが同期を開始します。
updateSupported-TXNSameSame
insertSupported-TXNSameSame
insert into overwriteSupported(一時パーティション除く)2.1.6Partial SyncSameSame
insert into overwriteSupported(一時パーティション除く)2.0full syncSameSame
Explicit transaction (3.0) begin commitNot Supported

パーティション 運用

OperationSupportedDoris VersionSync MethodCan Downstream Operate Independentlyデスクリプション
add partitionSupported-SQLNo、その後のFull SyncまたはPartial Syncのトリガーがダウンストリーム操作の消失を引き起こしますcooldown timeプロパティとその動作は不明です
add temp partitionNot SupportedSameバックアップはtemp partitionをサポートしていません。Doris 2.1.8/3.0.4以降、アップストリームFE設定:ignore_backup_tmp_partitionsを変更してこの問題を回避できます
drop partitionSupported-SQL/Full SyncSame2.0.15/2.1.6以前:Full Sync、以降:SQL
replace partitionSupported2.1.7/3.0.3Partial SyncSamePartial Syncはstrict rangeおよび非temp partitionのreplace方法のみをサポートし、そうでない場合はFull Syncをトリガーします。
modify partitionNot SupportedSameパーティションのプロパティの変更を指します
rename partitionSupported2.1.8/3.0.4SQLSame

Views

OperationSupportedDoris VersionSync MethodRemarks
create viewSupported-SQLアップストリームとダウンストリームが同じ名前の場合に動作します。ダウンストリームに既に存在する場合は、作成前に削除されます
alter viewSupported2.1.8/3.0.4SQL
drop viewSupported2.1.8/3.0.4SQL

::: note

Doris実装の制限により、ビュー内のカラム名/ビュー名をデータベース名と同じにすることはできません。

:::

Materialized Views

マテリアライズドビューの同期

OperationSupportedDoris VersionSync MethodRemarks
create materialized viewSupported2.1.8/3.0.4Partial Syncアップストリームとダウンストリームが同じ名前の場合に動作します。異なる名前の場合、ダウンストリームでビューを手動で再構築する必要があります。
drop materialized viewSupported2.1.8/3.0.4SQL

非同期マテリアライズドビュー

OperationSupported
create async materialized viewNot Supported
alter async materialized viewNot Supported
drop async materialized viewNot Supported
refreshNot Supported
pauseNot Supported
resumeNot Supported

Statistics

アップストリームとダウンストリーム間で同期されず、独立して操作します。

Others

OperationSupported
external tableNot Supported
recycle binNot Supported
catalogNot Supported
workload groupNot Supported
jobNot Supported
functionNot Supported
policyNot Supported
userNot Supported
cancel alter jobSupported