Skip to main content

Configuration Reference

This document is for operators and developers who use Doris CCR (Cross-Cluster Replication). It collects the configuration items at the FE, BE, and database/table levels that require attention or adjustment, and provides default values and applicable versions so you can quickly cross-check them during setup and operation.

Applicable Scenarios

ScenarioConfiguration area to focus on
Initial setup of a CCR sync pipelineFE basic parameters, database/table binlog properties
Synced tables contain inverted indexes or bitmap indexesrestore_reset_index_id
Upstream frequently creates temporary partitions, causing sync interruptionsignore_backup_tmp_partitions
A single table has more than 100,000 tabletsrestore_job_compressed_serialization, backup_job_compressed_serialization
Network bandwidth is ample and you want to speed up incremental syncBE download-related parameters
Backup/restore jobs are large in scale and long-runningbackup_job_default_timeout_ms, thrift_max_message_size

Prerequisites

  • Two Doris clusters (upstream and downstream) have been deployed, and the CCR Syncer has been installed and connected.
  • You have permission to modify the FE and BE configuration files fe.conf / be.conf of both upstream and downstream clusters.
  • The current cluster version is known, so you can determine whether each configuration item takes effect.

Configuration Workflow Overview

  1. Modify fe.conf on the FE nodes of both upstream and downstream clusters, and restart or apply dynamically as needed.
  2. Modify be.conf on the BE nodes of both upstream and downstream clusters, and restart or apply dynamically as needed.
  3. Set database/table binlog properties through CREATE TABLE / ALTER TABLE.
  4. Start or restart the CCR sync task, observe its running state, and tune the parameters as needed.

FE Configuration

Configure in fe.conf, for example:

restore_reset_index_id = true
NameDescriptionDefault valueVersion
restore_reset_index_idIf synced tables use inverted indexes or bitmap indexes, set this to false.falseStarting from 2.1.8 and 3.0.4.
ignore_backup_tmp_partitionsTo avoid sync interruptions caused by upstream creating tmp partition, set this to true.falseStarting from 2.1.8 and 3.0.4.
max_backup_restore_job_num_per_dbThe limit on the number of in-memory backup/restore jobs per DB. The recommended value is 2.10All versions.
label_num_thresholdControls the number of TXN Labels to prevent transactions from being recycled too quickly. A value that is too large consumes more memory; a value that is too small may cause data duplication under abnormal conditions. The default value is sufficient in most cases.2000Starting from 2.1.
restore_job_compressed_serializationRecommended to set to true when the tablet count exceeds 100,000.
Before downgrading, disable this configuration and ensure the FE completes a checkpoint.
When upgrading from 2.1 to 3.0, upgrade to at least 3.0.3.
falseStarting from 2.1.8 and 3.0.3.
backup_job_compressed_serializationRecommended to set to true when the tablet count exceeds 100,000.
Before downgrading, disable this configuration and ensure the FE completes a checkpoint.
When upgrading from 2.1 to 3.0, upgrade to at least 3.0.3.
falseStarting from 2.1.8 and 3.0.3.
backup_job_default_timeout_msTimeout for backup/restore jobs. Must be configured on the FE of both the source and target clusters.NoneSet as needed
enable_restore_snapshot_rpc_compressionEnables snapshot info compression to reduce RPC message size. Recommended to set to true.trueStarting from 2.1.8 and 3.0.3.

BE Configuration

Configure in be.conf, for example:

thrift_max_message_size = 2000000000
NameDescriptionDefault valueVersion
thrift_max_message_sizeMaximum size of a single RPC packet on the BE thrift server. When the CCR job involves a large number of tablets, set this to 2000000000.100MBAll versions
be_thrift_max_pkg_bytesMaximum size of BE Thrift RPC message packets.20MBSpecific to 2.0.
max_download_speed_kbpsDownload rate limit per download worker on the downstream BE. Default is 50MB/s per thread.50MB/sAll versions
download_worker_countNumber of threads for download tasks. Set according to the network card, disk, and workload.1All versions

Database/Table Properties

Set through CREATE TABLE or ALTER TABLE to control binlog behavior at the database/table level.

NameDescriptionDefault valueVersion
binlog.max_bytesMaximum memory footprint of the binlog. Recommended to reserve at least 4GB.UnlimitedAll versions
binlog.ttl_secondsBinlog retention time.Unlimited before 2.0.5; 1 day (86400) starting from 2.0.5All versions

Common Tuning Combinations

The table below summarizes common configuration combinations chosen based on runtime behavior, so you can apply them quickly as needed:

Symptom / GoalRecommended configuration
Synced tables contain inverted index / bitmap indexFE: restore_reset_index_id = false
Upstream frequently creates temporary partitions, causing sync interruptionsFE: ignore_backup_tmp_partitions = true
Backup/restore jobs pile up on a single DB and FE memory is tightFE: max_backup_restore_job_num_per_db = 2
A single table has more than 100,000 tabletsFE: restore_job_compressed_serialization = true, backup_job_compressed_serialization = true; also enable enable_restore_snapshot_rpc_compression = true
Backup/restore jobs are very large and the default timeout is insufficientFE: increase backup_job_default_timeout_ms as needed (must be configured on both source and target clusters)
RPC packets are too large, causing backup/restore failuresBE: thrift_max_message_size = 2000000000
Downstream download speed is limited and incremental sync is slowBE: increase download_worker_count, and adjust max_download_speed_kbps as needed
Control the binlog size of a single table to prevent memory bloatDatabase/table: set binlog.max_bytes (recommended to reserve at least 4GB) and binlog.ttl_seconds

Notes on Version Upgrades and Downgrades

  • After enabling restore_job_compressed_serialization or backup_job_compressed_serialization, if you need to downgrade, disable the corresponding configuration first and ensure the FE completes a checkpoint before performing the downgrade.
  • When upgrading from 2.1 to 3.0, the target version must be at least 3.0.3 to match the implementation of the compressed serialization configurations.
  • binlog.ttl_seconds defaulted to unlimited before 2.0.5 and defaults to 1 day (86400 seconds) starting from 2.0.5. After upgrading from an older version, set it explicitly according to your storage and replay requirements.