mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 60641: Allowed to pass total resources in 'UpdateSlaveMessage'.
Date Fri, 07 Jul 2017 17:40:16 GMT

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


Fix it, then Ship it!





src/master/master.cpp
Line 900 (original), 901 (patched)
<https://reviews.apache.org/r/60641/#comment254801>

    Given that 'type' here might be optional. It's weird that we use this overload of 'install'.
    
    Let's just use the install variant that takes the protobuf message itself.
    
    ```
    install<UpdateSlaveMessage>(&Master::updateSlave);
    
    void Master::updateSlave(const UpdateSlaveMessage& message);
    ```


- Jie Yu


On July 7, 2017, 8:54 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60641/
> -----------------------------------------------------------
> 
> (Updated July 7, 2017, 8:54 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Jan Schlicht.
> 
> 
> Bugs: MESOS-7757
>     https://issues.apache.org/jira/browse/MESOS-7757
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This commit both extends the existing 'UpdateSlaveMessage' proto
> message, and adjusts its handling on the agent and master side.
> 
> To distinguish updates to 'oversubscribed_resources' from updates to
> 'total_resources' the message now contains a 'type' field to allow
> disambiguation among an empty list of resources and an unset list of
> resources. For backwards-compatibility we assume whenever the type
> field was not set that caller intended to use the
> 'oversubscribed_resources' field as opposed to the 'total_resources'
> field.
> 
> Currently, passing 'total_resources' is handled neither in the master
> nor the default allocator; we will implement this in a subsequent
> patch.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp 95c2d0fab32d6b60f29a86037607ff009bd78717 
>   src/master/master.cpp 56b170ed70722eba30d98f6e648b6a31580d6b56 
>   src/messages/messages.proto 67cee3146a45f8f720b4e60739cf85085d18259b 
>   src/slave/slave.cpp 52f673633fa0041259ae40f88d4c0281a1e053b0 
>   src/tests/oversubscription_tests.cpp 2266510091b49c61310a363ab6644708655787dc 
> 
> 
> Diff: https://reviews.apache.org/r/60641/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


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