seojangho commented on a change in pull request #11: [NEMO-42] Make SchedulerRunner reactive, Ensure reverse-topological ordering in scheduling URL: https://github.com/apache/incubator-nemo/pull/11#discussion_r177311783
########## File path: runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/MetricManagerWorker.java ########## @@ -53,7 +53,7 @@ private MetricManagerWorker(@Parameter(MetricFlushPeriod.class) final long flush flushingPeriod, TimeUnit.MILLISECONDS); } - private void flushMetricMessageQueueToMaster() { + private synchronized void flushMetricMessageQueueToMaster() { Review comment: If `MetricManagerWorker#close` and `batchMetricMessages#run` happens to invoked concurrently, `flushMetricMessageQueueToMaster` would not guarantee consistent behavior without proper synchronization. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services