> On Aug. 5, 2016, 12:36 p.m., Jonathan Hurley wrote:
> > This is an AmbariEvent which has it's own EventBus; however the bus is an 
> > asynchronous, single-threaded bus. This means that it's possible for a 
> > heartbeat to be received in between when this event is broadcast and when 
> > it's received by your subscriber method. 
> > 
> > If the problem only happens on registration, I think this solution is OK. 
> > But if a heartbeat from an agent can cause problems as well, then there is 
> > still a slight chance that the timing here could still reproduce the bug.

Thanks for the observation. The problem only occurred on registration; Even if 
the host is registered before the host remove event is processed, the 
registering host will have a new id, thus the removal won't interfere with the 
new method.


- Laszlo


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


On Aug. 4, 2016, 3:22 p.m., Laszlo Puskas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50753/
> -----------------------------------------------------------
> 
> (Updated Aug. 4, 2016, 3:22 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Robert Nettleton, Sandor Magyari, 
> and Sebastian Toader.
> 
> 
> Bugs: AMBARI-18005
>     https://issues.apache.org/jira/browse/AMBARI-18005
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When a host is removed from the cluster and later from ambari there's a 
> chance the agent registers back to the ambari server before the agent is 
> stopped.
> Stopping the machine running the agent without the host being deleted again 
> leads to an inconsistent state in the ambari-server due to cached state.
> Resolution:
> The cached resources get cleared on host delete event.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 
> a757010 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
>  0190478 
> 
> Diff: https://reviews.apache.org/r/50753/diff/
> 
> 
> Testing
> -------
> 
> Suceesfully tested. (Manually)
> Unit tests in progress.
> 
> 
> Thanks,
> 
> Laszlo Puskas
> 
>

Reply via email to