-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51536/#review147358
-----------------------------------------------------------




src/main/java/org/apache/aurora/scheduler/updater/InstanceUpdater.java (lines 
125 - 135)
<https://reviews.apache.org/r/51536/#comment214467>

    This could be rewritten a bit more concisely as:
    
        return actualState != null && 
actualState.getTaskEvents().stream().filter(event ->
          event.getStatus() == ScheduleStatus.RUNNING && event.isSetMessage()
        ).findFirst().isPresent();



src/main/java/org/apache/aurora/scheduler/updater/InstanceUpdater.java (line 
130)
<https://reviews.apache.org/r/51536/#comment214465>

    Doing this based simply on the presence of a string feels brittle to me. 
Would it make sense to define some basic form of "executor capabilities" 
passing? Even if it's something simple like a comma delimited list of constants 
that we define in api.thrift (so that both the scheduler and the executor can 
reuse the values)?



src/main/java/org/apache/aurora/scheduler/updater/InstanceUpdater.java (line 
143)
<https://reviews.apache.org/r/51536/#comment214469>

    We should add a constant to api.thrift for `health` and use it here as well 
as in the executor.



src/main/java/org/apache/aurora/scheduler/updater/InstanceUpdater.java (lines 
156 - 157)
<https://reviews.apache.org/r/51536/#comment214468>

    formatting for this should be:
    
        if (isWatchRunningSkippable(actualState)
            && isHealthCheckEnabled(desiredState.get())
            || appearsStable(actualState)) {
          // blank line
          ...block begins
        }



src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java 
(lines 71 - 73)
<https://reviews.apache.org/r/51536/#comment214470>

    I'm confused by this comment in the context of this review. 
`initial_interval_secs` is strictly an executor concern...



src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java 
(line 176)
<https://reviews.apache.org/r/51536/#comment214471>

    I'd avoid terms like "new executor", as "new" tends to lose meaning over 
time.



src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java 
(lines 191 - 201)
<https://reviews.apache.org/r/51536/#comment214473>

    Beyond setting things up to use the new style executor, I don't think this 
test actually verifies anything due to the fact that `INITIAL_INTERVAL_SECOND` 
has the same value as `MIN_RUNNING_TIME`. Ideally we'd advance the time by some 
value less than `MIN_RUNNING_TIME` to prove that we're not waiting that long 
before declaring the task running?


- Joshua Cohen


On Aug. 30, 2016, 8:52 p.m., Kai Huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51536/
> -----------------------------------------------------------
> 
> (Updated Aug. 30, 2016, 8:52 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen, Maxim Khutornenko, and Zameer Manji.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> - Scheduler updater will not use watch_sec if health check is enabled
> - Add unit tests for successful updates.
> 
> This feature intends to improve reliability and performance of the Aurora 
> scheduler job updater by relying on health check status rather than 
> watch_secs timeout when deciding an individual instance update state. 
> 
> See this epic: https://issues.apache.org/jira/browse/AURORA-894 
> and the design doc: 
> https://docs.google.com/document/d/1ZdgW8S4xMhvKW7iQUX99xZm10NXSxEWR0a-21FP5d94/edit#
>  for more details and background.
> 
> 
> Assumptions on executor change:
> The executor starts health check at STARTING, if a successful health check is 
> performed before initial_interval_sec expires, the executor will sends a 
> status message for RUNNING.
> 
> What I try to implement:
> vCurrent updater will infer the executor version from the presence of a 
> status message sent by the executor during RUNNING status update. 
> 
> For vPrev executor:
>     The vCurrent updater will use watch_sec for instance update, this is 
> independent from the health check.
> For vCurrent executor:
>     If health check is disabled on vCurrent executor, the vCurrent updater 
> will use watch_sec for instance update.
>     If health check is enabled on vCurrent executor, the vCurrent updater 
> will not use watch_sec for instance update.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/updater/InstanceUpdater.java 
> c129896d8cd54abd2634e2a339c27921042b0162 
>   src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java 
> c78c7fbd7d600586136863c99ce3d7387895efee 
> 
> Diff: https://reviews.apache.org/r/51536/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build
> 
> ./gradlew :test --tests 
> "org.apache.aurora.scheduler.updater.InstanceUpdaterTest"
> 
> ./build-support/jenkins/build.sh
> 
> 
> Thanks,
> 
> Kai Huang
> 
>

Reply via email to