> On Jan. 20, 2016, 3:11 p.m., Klaus Ma wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 1048
> > <https://reviews.apache.org/r/42535/diff/1/?file=1202461#file1202461line1048>
> >
> >     Suggest to add some tests for this case.
> 
> Alexander Rukletsov wrote:
>     I totally agree we need more tests for allocator recovery (we have none 
> right now). But could you please describe the particular one you have in mind?

Sorry for short comments :). That's the case I'd suggest to add:

1. initialize()
2. create one Quota; one Quota is enough to avoid return before `delay(..., 
resume())` in `::recover()`;
3. `allocator->recover(2, quotas)`;
4. add two slaves by `addSlave()`, the latest `addSlave` will trigger 
`::resume()`
5. `advance(10mins)` to trigger resume() again which is delay in `::recover()`
 
Without this fix, `CHECK` should be failed because `::resume()` twice. 

BTW, should be a JIRA to export `ALLOCATION_HOLD_OFF_RECOVERY_TIMEOUT` & 
`AGENT_RECOVERY_FACTOR` as flags?


- Klaus


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


On Jan. 20, 2016, 10:09 a.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42535/
> -----------------------------------------------------------
> 
> (Updated Jan. 20, 2016, 10:09 a.m.)
> 
> 
> Review request for mesos, Ben Mahler and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4417
>     https://issues.apache.org/jira/browse/MESOS-4417
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.hpp 
> 101482156ffc5a4fe3cd60be222bfe609330ec3c 
>   src/master/allocator/mesos/hierarchical.cpp 
> e32ee4aa3ed9793bb5a99233e699e5cc2bdd796b 
> 
> Diff: https://reviews.apache.org/r/42535/diff/
> 
> 
> Testing
> -------
> 
> `make check` on Mac OS 10.10.4
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>

Reply via email to