feat: support medium sync policy in CCR tasks #624
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements storage medium sync policy support for ccr-syncer tasks. The enhancement introduces retry mechanisms for CREATE TABLE operations and storage medium synchronization for MODIFY PARTITION operations.
Background & Problem
In CCR scenarios, source and destination clusters often have different storage medium configurations:
Solution: Medium Sync Policy
HTPP Server Change
medium_sync_policy
attribute for policy configurationTwo Medium Sync Policies
Policies 1:
hdd
(Force HDD)Policies 2:
same_with_upstream
(Preserve Original)Technical Implementation
Restore(full/partial sync)
Please jump into this pr: apache/doris#52391
CREATE TABLE Binlog Enhancement
Multi-retry mechanism with intelligent fallback:
MODIFY PARTITION Binlog Enhancement
Storage medium property synchronization:
Strategy Behavior Comparison
hdd
Strategysame_with_upstream
StrategyExamples
Scenario 1: Source SSD Table → Destination HDD-only Cluster
CREATE TABLE binlog processing:
CREATE TABLE orders (...) PROPERTIES ("storage_medium" = "ssd")
hdd
:storage_medium=hdd
same_with_upstream
:storage_medium=hdd(ssd -> hdd)
MODIFY PARTITION binlog processing:
hdd
: Skip all partition medium modificationssame_with_upstream
: Alter storage meidumScenario 2: Source Mixed → Destination Mixed Cluster
CREATE TABLE binlog processing:
MODIFY PARTITION binlog processing: