メインコンテンツまでスキップ

機能詳細

DorisのCross-クラスター 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のバージョン >= DownstreamのDorisバージョン >= UpstreamのDorisバージョン。そのため、まずSyncer、次にDownstreamのDoris、最後にUpstreamのDorisの順でアップグレードしてください。
  3. CCRは現在、ストレージとコンピュートの分離をサポートしていません。

Database

Database プロパティ

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

PropertySupportedDoris VersionSync Method詳細
replication_allocationSupported-Full Sync
data quotaNot Supported
replica quotaNot Supported

Modify Database プロパティ

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

PropertySupportedCan Upstream OperateCan Downstream Operate詳細
replication_allocationNot SupportedNoNo両側での操作はCCRタスクの中断を引き起こします
data quotaNot SupportedYesYes
replica quotaNot SupportedYesYes

Rename Database

UpstreamとDownstreamでのリネームはサポートされていません。実行するとビューが動作しなくなる可能性があります。

table

table プロパティ

PropertySupportedDoris VersionSync Method詳細
table Model (duplicate, unique, aggregate)Supported-SQL
パーティション and BucketingSupported-SQL
replication_numSupported-SQL
replication_allocation (resource group)Supported-SQLUpstreamとDownstreamが一致している必要があり、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
variant_enable_flatten_nestedSupported-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タスクによって同期されているテーブルでは操作できません。テーブル作成のプロパティを参照。ほとんどの場合、SQLで同期を使用します。ユーザーが特定のセッション変数を設定した場合や、create table文に転置インデックスが含まれている場合など、一部の操作ではPartial Syncを使用します
drop tableSupported-SQL/Full Sync同上2.0.15/2.1.6以前:Full Sync、以降:SQL
rename tableテーブルレベルタスクはデータベースレベルタスクをサポートしません2.1.8/3.0.4SQL同上テーブルレベルタスクのリネームはCCRタスクの停止を引き起こします
replace tableSupported2.1.8/3.0.4SQL/Full Sync同上データベースレベル同期にはSQLを使用。テーブルレベルはFull Syncをトリガーします
truncate tableSupported-SQL同上
restore tableNot Supported同上

Modify table プロパティ

同期方法はSQLです。

PropertySupportedDoris VersionCan Upstream OperateCan Downstream Operate詳細
colocateNot SupportedYesNoDownstream操作でFull Syncをトリガーするとデータ損失が発生します
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 SupportedYesNoDownstream操作でFull Syncをトリガーするとデータ損失が発生します
isBeingSyncedNot SupportedNoNo
compaction series propertiesNot SupportedYesNoDownstream操作でFull Syncをトリガーするとデータ損失が発生します
skip_write_index_on_loadNot SupportedYesSame
seq columnSupported-YesNoDownstream操作でFull Syncをトリガーするとデータ損失が発生します
delete sign columnSupported-YesSame
commentSupported2.1.8/3.0.4YesNoDownstream操作でFull Syncをトリガーするとデータ損失が発生します

Column 操作

テーブル内の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列の追加/削除には、テーブル作成時にプロパティ"light_schema_change" = "true"を設定する必要があります。

テーブル内のRollup Indexでの列操作。

OperationSupportedDoris VersionSync MethodRemarks
add key columnSupported2.1.8/3.0.4Partial Sync
add value columnSupported2.1.8/3.0.4SQLlightning schema changeの有効化が必要
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、ダウンストリームでインポートした場合、その後のFull SyncやPartial Syncのトリガーがデータ損失を引き起こしますUpstreamのトランザクションが可視、つまりbinlog生成時にデータが可視になると、ダウンストリームが同期を開始します。
broker loadSupported(一時パーティションを除く)-TXNSameSame
routine loadSupported(一時パーティションを除く)-TXNSameSame
mysql loadSupported(一時パーティションを除く)-TXNSameSame
group commitSupported(一時パーティションを除く)2.1TXNSameSame

Data 操作

OperationSupportedDoris VersionSync MethodCan Downstream Operate詳細
deleteSupported-TXNNo、ダウンストリームで操作した場合、その後のFull SyncやPartial Syncのトリガーがデータ損失を引き起こしますUpstreamのトランザクションが可視、つまり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以降、upstream 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パーティション置換方法のみサポートします。そうでなければFull Syncがトリガーされます。
modify partitionNot SupportedSameパーティションのプロパティ変更を指します
rename partitionSupported2.1.8/3.0.4SQLSame

Views

OperationSupportedDoris VersionSync MethodRemarks
create viewSupported-SQLupstreamとdownstreamが同じ名前の場合に動作します。ダウンストリームで既に存在する場合は、作成前に削除されます
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 Syncupstreamとdownstreamが同じ名前の場合に動作します。名前が異なる場合、ダウンストリームで手動でビューを再構築する必要があります。
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

upstreamとdownstream間で同期されません。独立して操作します。

Others

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