Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/622#discussion_r29227228
  
    --- Diff: 
flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
 ---
    @@ -795,108 +795,111 @@ extends Actor with ActorLogMessages with 
ActorLogging {
         var startRegisteringTask = 0L
         var task: Task = null
     
    -    // all operations are in a try / catch block to make sure we send a 
result upon any failure
    -    try {
    -      // check that we are already registered
    -      if (!isConnected) {
    -        throw new IllegalStateException("TaskManager is not associated 
with a JobManager")
    -      }
    -      if (slot < 0 || slot >= numberOfSlots) {
    -        throw new Exception(s"Target slot ${slot} does not exist on 
TaskManager.")
    -      }
    +    if (!isConnected) {
    +      sender ! Failure(
    +        new IllegalStateException("TaskManager is not associated with a 
JobManager.")
    +      )
    +    } else if (slot < 0 || slot >= numberOfSlots) {
    +      sender ! Failure(new Exception(s"Target slot $slot does not exist on 
TaskManager."))
    +    } else {
    +      sender ! Acknowledge
     
    -      val userCodeClassLoader = libraryCacheManager match {
    -        case Some(manager) =>
    -          if (LOG.isDebugEnabled) {
    -            startRegisteringTask = System.currentTimeMillis()
    -          }
    +      Future {
    +        try {
    --- End diff --
    
    Will do.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to