Details

      Description

      Before the task state refactoring the class ExpungeOverdueLostTasksActor had following logic to filter unreachable tasks which received 24 hours no updates:

        def filterLostGCTasks(tasks: Map[PathId, AppTasks]): Iterable[Task] = {
          def isTimedOut(task: Task): Boolean = {
            task.mesosStatus.fold(false) { status =>
              val age = clock.now().toDateTime.minus(status.getTimestamp.toLong * 1000).getMillis.millis
              age > config.taskLostExpungeGC
            }
          }
          tasks.values.flatMap(_.tasks.filter {
            case TemporarilyUnreachable(task) if isTimedOut(task) => true
            case _ => false
          })
        }
      
      

      During the refactoring the filter was changed to

      tasks.values.flatMap(_.tasks.filter(task => isTimedOut(task.mesosStatus)))

      which misses the fact that it should filter the unreachable tasks, which I re-introduced with this PR by adding task => task.isUnreachable && isTimedOut(task.mesosStatus)

        Attachments

          Activity

            People

            • Assignee:
              ken Ken Sipe
              Reporter:
              junterstein Johannes Unterstein
              Team:
              Orchestration Team
              Watchers:
              Marco Monaco
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: