Skip to content

Commit 3f9bef7

Browse files
perhammanton.voskresensky
andauthored
fix reten
Co-authored-by: anton.voskresensky <anton.voskresensky@flant.com>
1 parent a952b94 commit 3f9bef7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

commands/retention.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ func runRetention(cmd *cobra.Command, args []string) error {
9090
continue
9191
}
9292

93+
logger.Info(fmt.Sprintf("Valid snapshot found index=%s", idx.Index))
94+
9395
indicesToDelete = append(indicesToDelete, idx)
9496
}
9597

@@ -132,6 +134,10 @@ func runRetention(cmd *cobra.Command, args []string) error {
132134
}
133135

134136
logger.Info(fmt.Sprintf("Updated utilization utilization=%d", avgUtil))
137+
138+
if float64(avgUtil) <= threshold {
139+
break
140+
}
135141
}
136142

137143
logger.Info(fmt.Sprintf("Retention completed finalUtilization=%d", avgUtil))

0 commit comments

Comments
 (0)