Skip to content

Commit

Permalink
Disable clean tables & partitions by default (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
w41ter authored Sep 10, 2024
1 parent 50d3058 commit 6ab94ff
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pkg/ccr/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,13 +672,12 @@ func (j *Job) fullSync() error {
}

// drop exists partitions, and drop tables if in db sync.
cleanTables, cleanPartitions := false, true
if j.SyncType == DBSync {
cleanTables = true
}
cleanTables, cleanPartitions := false, false
if featureCleanTableAndPartitions {
cleanTables = false
cleanPartitions = false
cleanPartitions = true
if j.SyncType == DBSync {
cleanTables = true
}
}
restoreResp, err := destRpc.RestoreSnapshot(dest, tableRefs, restoreSnapshotName, snapshotResp, cleanTables, cleanPartitions)
if err != nil {
Expand Down

0 comments on commit 6ab94ff

Please sign in to comment.