From 3a574d32bba8bd83c238a61cb4cedbf84dbf865f Mon Sep 17 00:00:00 2001 From: Prasad Ghangal Date: Thu, 27 Jun 2024 16:17:00 +0530 Subject: [PATCH] Correct metadata compression policy merge logic Signed-off-by: Prasad Ghangal --- snapshot/policy/policy_merge.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapshot/policy/policy_merge.go b/snapshot/policy/policy_merge.go index 55ff86de456..d724f6fe9e1 100644 --- a/snapshot/policy/policy_merge.go +++ b/snapshot/policy/policy_merge.go @@ -24,9 +24,8 @@ func MergePolicies(policies []*Policy, si snapshot.SourceInfo) (*Policy, *Defini merged.SchedulingPolicy.Merge(p.SchedulingPolicy, &def.SchedulingPolicy, p.Target()) merged.UploadPolicy.Merge(p.UploadPolicy, &def.UploadPolicy, p.Target()) merged.CompressionPolicy.Merge(p.CompressionPolicy, &def.CompressionPolicy, p.Target()) - merged.SplitterPolicy.Merge(p.SplitterPolicy, &def.SplitterPolicy, p.Target()) - merged.CompressionPolicy.Merge(p.CompressionPolicy, &def.CompressionPolicy, p.Target()) merged.MetadataCompressionPolicy.Merge(p.MetadataCompressionPolicy, &def.MetadataCompressionPolicy, p.Target()) + merged.SplitterPolicy.Merge(p.SplitterPolicy, &def.SplitterPolicy, p.Target()) merged.Actions.Merge(p.Actions, &def.Actions, p.Target()) merged.OSSnapshotPolicy.Merge(p.OSSnapshotPolicy, &def.OSSnapshotPolicy, p.Target()) merged.LoggingPolicy.Merge(p.LoggingPolicy, &def.LoggingPolicy, p.Target()) @@ -43,6 +42,7 @@ func MergePolicies(policies []*Policy, si snapshot.SourceInfo) (*Policy, *Defini merged.SchedulingPolicy.Merge(defaultSchedulingPolicy, &def.SchedulingPolicy, GlobalPolicySourceInfo) merged.UploadPolicy.Merge(defaultUploadPolicy, &def.UploadPolicy, GlobalPolicySourceInfo) merged.CompressionPolicy.Merge(defaultCompressionPolicy, &def.CompressionPolicy, GlobalPolicySourceInfo) + merged.MetadataCompressionPolicy.Merge(defaultMetadataCompressionPolicy, &def.MetadataCompressionPolicy, GlobalPolicySourceInfo) merged.SplitterPolicy.Merge(defaultSplitterPolicy, &def.SplitterPolicy, GlobalPolicySourceInfo) merged.Actions.Merge(defaultActionsPolicy, &def.Actions, GlobalPolicySourceInfo) merged.OSSnapshotPolicy.Merge(defaultOSSnapshotPolicy, &def.OSSnapshotPolicy, GlobalPolicySourceInfo)