aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Farner <wfar...@apache.org>
Subject Re: Review Request 63316: Directly call 'registered' in SchedulerLifecycle as opposed to having it be a pubsub event
Date Thu, 26 Oct 2017 16:17:39 GMT

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



Did you consider a second `EventBus` for this?  At first glance, that seems favorable for
alignment with existing patterns; and i tend to agree with the [`EventBus` motivations](https://github.com/google/guava/wiki/EventBusExplained#why-use-an-annotation-to-mark-handler-methods-rather-than-requiring-the-listener-to-implement-an-interface).
 It also has the secondary benefit of simplifying testing with mocks by removing the call
to `listen()`.

- Bill Farner


On Oct. 25, 2017, 8:14 p.m., Jordan Ly wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63316/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2017, 8:14 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin, Stephan Erb, and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Directly call 'registered' in SchedulerLifecycle as opposed to having it be a pubsub
event.
> 
> It is currently possible for the scheduler to register with Mesos, but have the pubsub
event stating registration was successful get drowned out by other events (i.e. status updates).
This can cause the scheduler to think that registration was not successful and transition
to a DEAD state. This edge-case can cause the scheduler to flap, since when it comes back
up it will still get the same flood of status updates and potentially fail to register again.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/DriverRegisteredListener.java PRE-CREATION

>   src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java aa09aff5fc65352111223abfc2425e8e066b9383

>   src/main/java/org/apache/aurora/scheduler/SchedulerModule.java 382181939d292ee00ea2071daec66aa0669609e4

>   src/main/java/org/apache/aurora/scheduler/events/PubsubEvent.java 73fcdd0a7b3476a26c5383edbfef522aa65f4435

>   src/main/java/org/apache/aurora/scheduler/mesos/MesosCallbackHandler.java 68d19ec53b3bb5ee02934254e8f9c82ae720c6ed

>   src/main/java/org/apache/aurora/scheduler/mesos/SchedulerDriverModule.java b54e1f3d427b8e99fb022536004014c3fee498d0

>   src/main/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverService.java
46090642bf21819fccd232d1202a14f5534310a8 
>   src/test/java/org/apache/aurora/scheduler/SchedulerLifecycleTest.java edd738030edf3c00e96c57dffbde4cf6b20dde41

>   src/test/java/org/apache/aurora/scheduler/mesos/MesosCallbackHandlerTest.java 4d1a6761b8cd761d96cbfb35b0944eb524bd654f

>   src/test/java/org/apache/aurora/scheduler/mesos/VersionedSchedulerDriverServiceTest.java
a72bd4dd06114c136ee6e04a1bdf5a19d0af58ed 
> 
> 
> Diff: https://reviews.apache.org/r/63316/diff/5/
> 
> 
> Testing
> -------
> 
> `./gradlew test`
> 
> 
> Thanks,
> 
> Jordan Ly
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message