You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2017/05/09 08:29:49 UTC
Re: Review Request 58136: Cleaned up pattern matching in Resource
operator==.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58136/#review174276
-----------------------------------------------------------
Ship it!
Ship It!
- Jie Yu
On April 3, 2017, 7:57 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58136/
> -----------------------------------------------------------
>
> (Updated April 3, 2017, 7:57 a.m.)
>
>
> Review request for mesos and Jie Yu.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> The usual pattern for checking optional fields here is to check
> whether the field is is either set for both sides or unset for both.
> Subsequentially we check if possible values are equal, returning
> 'false' if they are not.
>
> The code changed here did not follow this pattern, but instead assumed
> it was the last check to run. This made it possible that a careless
> addition after these checks would never be called.
>
>
> Diffs
> -----
>
> src/common/resources.cpp c26e0f995006dc6b2e70a491cea58fa90347e42a
> src/v1/resources.cpp a53deafbea399a1bcf729d1c151bc46e9da04e11
>
>
> Diff: https://reviews.apache.org/r/58136/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Benjamin Bannier
>
>