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



src/master/registrar.cpp
<https://reviews.apache.org/r/18675/#comment66901>

    The semantics here are a bit hard to follow.
    
    How about instead of "recovering" variable you make 'recovered' 
Option<Promise<Registry> >? One side benefit is that when some one calls 
admit() etc with calling recover() first you could immediately return a failure 
if 'recovered.isNone()'. I think this explicitness is better than having those 
calls waiting forever?
    
    Also, why does it have to be MasterInfo? IIUC, all you want is someone to 
update the version of the registry. Can we just use a "bool" or "UUID" instead 
of MasterInfo?


- Vinod Kone


On March 3, 2014, 3:08 a.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18675/
> -----------------------------------------------------------
> 
> (Updated March 3, 2014, 3:08 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Bugs: MESOS-764
>     https://issues.apache.org/jira/browse/MESOS-764
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> As a safety measure, we would like to force a version change on the Registry 
> as a result of the recovery process. This helps prevent a "rogue" Master 
> (that still believes it is leading) from performing writes to the Registry.
> 
> This change adds a 'Recover' operation which adds the latest MasterInfo to 
> the Registry. Unfortunately, since the Registrar is injected to the Master, I 
> had to add 'MasterInfo' as an argument to the 'recover' function, thus 
> altering the design somewhat.
> 
> The current semantics are that there is no strict ordering required between 
> the 'recover' call and all other calls, however, all other calls are gated on 
> recovery completing. That is, if the caller omits a call to 'recover', any 
> other operations will be forever pending.
> 
> 
> Diffs
> -----
> 
>   src/master/registrar.hpp 20734afc69055197e9ab90d42253c56e4af4b97c 
>   src/master/registrar.cpp 37337c07b24a96e71910b7c83085d159361a1188 
>   src/tests/registrar_tests.cpp 3bf42bd77a10470a2afc6fd8e1da30d6134e792c 
> 
> Diff: https://reviews.apache.org/r/18675/diff/
> 
> 
> Testing
> -------
> 
> Added a small test.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>

Reply via email to