Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore repair_run_by_cluster_v2 rows with no corresponding repair #1478

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.SortedSet;
Expand Down Expand Up @@ -395,15 +396,14 @@ public List<RepairRun> getRepairRunsForClusterPrioritiseRunning(String clusterNa
)
)
);

// Defuture the repair_run rows and build the strongly typed RepairRun objects from the contents.
return repairRunFutures
.stream()
.map(
row -> {
Row extractedRow = row.getUninterruptibly().one();
return buildRepairRunFromRow(extractedRow, extractedRow.getUUID("id"));
}
).collect(Collectors.toList());
.map(row -> row.getUninterruptibly().one())
.filter(Objects::nonNull)
.map(extractedRow -> buildRepairRunFromRow(extractedRow, extractedRow.getUUID("id")))
.collect(Collectors.toList());
}

@Override
Expand Down
Loading