Github user dlogothetis commented on a diff in the pull request: https://github.com/apache/giraph/pull/84#discussion_r218556285 --- Diff: giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java --- @@ -1379,9 +1379,15 @@ private boolean barrierOnWorkerList(String finishedWorkerPath, // Wait for a signal or timeout boolean eventTriggered = event.waitMsecs(eventLoopTimeout); + + // If the event was triggered, we reset it. In the next loop run, we will + // read ZK to get the new hosts. + if (eventTriggered) { + event.reset(); + } + long elapsedTimeSinceRegularRunMsec = System.currentTimeMillis() - lastRegularRunTimeMsec; - event.reset(); --- End diff -- Are you talking about re-ordering the `long elapsedTimeSinceRegularRunMsec = ` command and the `event.reset()` command? That shouldn't matter, I just moved the `if(eventTriggered)` because is seemed a bit clearer to put it close to the code that outputs `eventTriggered`. The fix is the actual `if(eventTriggered)`.
---