mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Conway <neil.con...@gmail.com>
Subject Re: Review Request 60282: Introduced `upgradeResources` which also validates the resources.
Date Wed, 21 Jun 2017 20:01:32 GMT

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




src/common/resources_utils.cpp
Lines 271 (patched)
<https://reviews.apache.org/r/60282/#comment252576>

    Should we put `validate` in the name, e.g., `validateAndUpgradeResources`? As currently
named, the fact that it does validation is not obvious. Also, the current name suggests it
is symmetric with `downgradeResources`, which is not quite true.



src/common/resources_utils.cpp
Lines 274 (patched)
<https://reviews.apache.org/r/60282/#comment252583>

    Hmmm -- this means that we're going to validate most resources twice in most code paths,
right? That seems unfortunate, although I guess it isn't easy to avoid.


- Neil Conway


On June 21, 2017, 7:07 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60282/
> -----------------------------------------------------------
> 
> (Updated June 21, 2017, 7:07 p.m.)
> 
> 
> Review request for mesos and Neil Conway.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Validation code for operations, and tasks validated the resources as
> the first step, and assumed valid resources from then on. This means
> that it started to use functions such as `isDynamicallyReserved`.
> 
> However, since `isDynamicallyReserved` requires the resources to be
> in the "post-reservation-refinement" format, we must convert the
> resources before using those functions. For now, we introduce
> a `upgradeResources` abstraction which is called to validate and
> convert the resources before invoking operation / task validation.
> 
> 
> Diffs
> -----
> 
>   src/common/resources_utils.hpp 4b033687fa7224ffa36523cb3ca366f4384fd4f8 
>   src/common/resources_utils.cpp 751194c5ff5c794c77be3bcf16892af39de6d4d9 
> 
> 
> Diff: https://reviews.apache.org/r/60282/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message