Skip to content

Commit

Permalink
Fix bug in KillStalePendingSegments (apache#14961)
Browse files Browse the repository at this point in the history
  • Loading branch information
kfaraz authored Sep 11, 2023
1 parent dec6a0a commit 7871e63
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ private DateTime getMinCreatedTimeToRetain()
DateTime earliestActiveTaskStart = DateTimes.nowUtc();
DateTime latestCompletedTaskStart = null;
for (TaskStatusPlus status : statuses) {
if (status.getStatusCode() == null) {
// Unknown status
} else if (status.getStatusCode().isComplete()) {
if (status.getStatusCode() != null && status.getStatusCode().isComplete()) {
latestCompletedTaskStart = DateTimes.laterOf(
latestCompletedTaskStart,
status.getCreatedTime()
Expand Down

0 comments on commit 7871e63

Please sign in to comment.