From 6ab94ff3a08687fcdf2788287424083d9db19a9b Mon Sep 17 00:00:00 2001 From: walter Date: Tue, 10 Sep 2024 09:58:11 +0800 Subject: [PATCH] Disable clean tables & partitions by default (#161) --- pkg/ccr/job.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/ccr/job.go b/pkg/ccr/job.go index e828bfa4..736fc228 100644 --- a/pkg/ccr/job.go +++ b/pkg/ccr/job.go @@ -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 {