Skip to content

Commit 151c0f7

Browse files
committed
duplicate replication specs per num shards
1 parent fe37293 commit 151c0f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/translation/deployment/conversion.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,6 @@ func replicationSpecFromAtlas(replicationSpecs []admin.ReplicationSpec20240805)
734734
specs = append(
735735
specs,
736736
&akov2.AdvancedReplicationSpec{
737-
NumShards: spec.GetNumShards(),
738737
ZoneName: spec.GetZoneName(),
739738
RegionConfigs: regionConfigs,
740739
},
@@ -907,13 +906,16 @@ func replicationSpecToAtlas(replicationSpecs []*akov2.AdvancedReplicationSpec) *
907906
specs = append(
908907
specs,
909908
admin.ReplicationSpec20240805{
910-
NumShards: pointer.NonZeroOrDefault(spec.NumShards, 1),
911909
ZoneName: pointer.MakePtrOrNil(spec.ZoneName),
912910
RegionConfigs: &regionConfigs,
913911
},
914912
)
915913
}
916914

915+
for len(specs) != replicationSpecs[0].NumShards {
916+
specs = append(specs, specs[0])
917+
}
918+
917919
return &specs
918920
}
919921

0 commit comments

Comments
 (0)