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

    https://github.com/apache/flink/pull/925#discussion_r35079637
  
    --- Diff: 
flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
 ---
    @@ -400,20 +400,16 @@ class JobManager(
           import scala.collection.JavaConverters._
           sender ! 
RegisteredTaskManagers(instanceManager.getAllRegisteredInstances.asScala)
     
    -    case Heartbeat(instanceID, metricsReport, accumulators) =>
    +    case Heartbeat(instanceID, metricsReport, accumulators, 
asyncAccumulatorUpdate) =>
           log.debug(s"Received hearbeat message from $instanceID.")
     
    -      Future {
    -        accumulators foreach {
    -          case accumulators =>
    -              currentJobs.get(accumulators.getJobID) match {
    -                case Some((jobGraph, jobInfo)) =>
    -                  jobGraph.updateAccumulators(accumulators)
    -                case None =>
    -                  // ignore accumulator values for old job
    -              }
    -        }
    -      }(context.dispatcher)
    +      if (asyncAccumulatorUpdate) {
    --- End diff --
    
    Mixing test code in your production code is IMO bad style. If you need 
synchronous execution, then start the actor with a `CallingThreadDispatcher` or 
overwrite this message in the `TestingJobManager`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to