Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourav Maji committed May 15, 2024
1 parent b00fef7 commit cc60a4c
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,17 @@ protected boolean cleanupBackupVersion(Store store, String clusterName) {
stats.recordBackupVersionMismatch();
return false;
}
int repushSourceVersion = store.getVersion(currentVersion).get().getRepushSourceVersion();
int repushSourceVersion = NON_EXISTING_VERSION;
for (Version version: versions) {
if (version.getRepushSourceVersion() > NON_EXISTING_VERSION) {
repushSourceVersion = version.getRepushSourceVersion();
}
}
int finalRepushSourceVersion = repushSourceVersion;
List<Version> readyToBeRemovedVersions = versions.stream()
.filter(
v -> repushSourceVersion > NON_EXISTING_VERSION
? v.getNumber() == repushSourceVersion
v -> finalRepushSourceVersion > NON_EXISTING_VERSION
? v.getNumber() == finalRepushSourceVersion
: v.getNumber() < currentVersion)
.collect(Collectors.toList());

Expand Down

0 comments on commit cc60a4c

Please sign in to comment.