> On April 29, 2015, 10:15 p.m., Jie Yu wrote:
> > src/master/validation.cpp, line 575
> > <https://reviews.apache.org/r/32150/diff/8/?file=944524#file944524line575>
> >
> >     This fits into the above line?

Fixed.


> On April 29, 2015, 10:15 p.m., Jie Yu wrote:
> > src/master/validation.cpp, line 598
> > <https://reviews.apache.org/r/32150/diff/8/?file=944524#file944524line598>
> >
> >     No snake_case please:)
> >     
> >     Also, instead of using a boolean, can you pass an Option<string> 
> > principal as you did in `validate(reserve)`?
> 
> Michael Park wrote:
>     > No snake_case please:)
>     
>     Grr... the `snake_case` thing keeps getting me. I'll find a way to 
> prevent myself from it and meanwhile be more attentive about it.
>     
>     > Also, instead of using a boolean, can you pass an Option<string> 
> principal as you did in validate(reserve)?
>     
>     I considered that as well to keep "consistent", but decided that (1) we 
> don't pass `role` so we're not really consistent anyway, and (2) we'd be 
> passing more information than we need while hindering readability at the 
> callsite:
>     
>     ```
>     Option<Error> error = validation::operation::validate(
>         operation.unreserve(),
>         (framework->info.has_principal() ?
>            framework->info.principal() :
>            Option<string>::none()));       
>     ```
>            
>     as well as within the function: "we pass an `Option<string>` but ever 
> only perform presence tests on it via `isSome`, `isNone`, are we missing some 
> logic?".
>     
>     I guess is that you have/had similar thoughts, but do you perhaps have 
> strong reasons you would recommend passing `Option<string>` here?

Removed the `snake_case`, please let me know about the issue around passing a 
`bool` vs `Option<string>`.


- Michael


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


On May 2, 2015, 12:27 a.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32150/
> -----------------------------------------------------------
> 
> (Updated May 2, 2015, 12:27 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Ben Mahler, and Jie Yu.
> 
> 
> Bugs: MESOS-2139
>     https://issues.apache.org/jira/browse/MESOS-2139
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Handled reservation operations in `Master::_accept`.
> 
> Added `validate` functions in `src/master/validation.{hpp,cpp}`.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 56affd45e1e71e96ff5778b43271f81b9b9a9e4d 
>   src/master/master.cpp d42a6f321c88ec5d0418264bdda39d083ff54a7e 
>   src/master/validation.hpp 2d7416c053f82d6316542fa9c35b0e7bc605abec 
>   src/master/validation.cpp dc25995bf57397d42fcde458414f0402d19bf792 
>   src/tests/master_validation_tests.cpp 
> 4f2ad58c3ae0f611fb476c4d91a37dd6a5541395 
> 
> Diff: https://reviews.apache.org/r/32150/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Michael Park
> 
>

Reply via email to