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 61183: Triggered 'UpdateSlaveMessage' when 'ResourceProviderManager' updates.
Date Mon, 18 Sep 2017 22:03:45 GMT

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




src/slave/slave.cpp
Lines 1524 (patched)
<https://reviews.apache.org/r/61183/#comment261903>

    Can you update for the re-registration case as well?



src/slave/slave.cpp
Lines 3505-3507 (patched)
<https://reviews.apache.org/r/61183/#comment261925>

    I am trying very hard to think if this is problematic. It's very hard to reason about.
My intuition told me that this might be problematic because `totalResources` might reflect
some new update to the RP's resources that haven't synced with the master yet.
    
    Given that `lastSyncedTotalResources` is just an optimization, I'll just don't do anything
in this function.



src/slave/slave.cpp
Lines 6124-6126 (patched)
<https://reviews.apache.org/r/61183/#comment261902>

    No need for this given that you'll update `lastSyncedTotalResources` before sending `RegisterSlaveMessage`?



src/slave/slave.cpp
Lines 6609 (patched)
<https://reviews.apache.org/r/61183/#comment261904>

    Include the error message?
    
    I would make this a LOG(ERROR) instead



src/slave/slave.cpp
Lines 6617 (patched)
<https://reviews.apache.org/r/61183/#comment261930>

    I'd make this a LOG(INFO)



src/slave/slave.cpp
Lines 6620 (patched)
<https://reviews.apache.org/r/61183/#comment261927>

    Let's add a parathesis to the `case` statement:
    ```
    case ResourceProviderMessage::Type::UPDATE_TOTAL_RESOURCES: {
      ...
    }
    ```



src/slave/slave.cpp
Lines 6630 (patched)
<https://reviews.apache.org/r/61183/#comment261926>

    indentation?



src/slave/slave.cpp
Lines 6669 (patched)
<https://reviews.apache.org/r/61183/#comment261929>

    add a `break` for the first level switch? and a default?



src/tests/slave_tests.cpp
Lines 8357 (patched)
<https://reviews.apache.org/r/61183/#comment261934>

    can we get rid of the process:: prefix?



src/tests/slave_tests.cpp
Lines 8372 (patched)
<https://reviews.apache.org/r/61183/#comment261933>

    Do we need the `mesos::` prefix?


- Jie Yu


On Sept. 15, 2017, 1:15 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61183/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2017, 1:15 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Jan Schlicht.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The agent's resource provider manager sends a
> 'ResourceProviderMessage' when its managed resources change. This
> commit adds handling in the agent so that an 'UpdateSlaveMessage' is
> sent to the master to update the total resource available on the
> agent. We also store this total in the agent memory so that it can be
> resent on agent resubscription.
> 
> In order to provide push-like handling of the resource provider
> manager's message queue, we chain recursive calls to the handler for
> continuous processing. Initially, processing is kicked off from
> 'Slave::initialize'. In this simple implementation we e.g., provide no
> direct way to stop processing of messages, yet, but it can be achieved
> by e.g., replacing the manager with a new instance (this would also
> require updating routes).
> 
> Since the agent can only send an 'UpdateSlaveMessage' when it is
> registered with a master, a simple back-off of 5 s is implemented which
> will defer processing of a ready message should the agent not yet have
> registered.
> 
> To facilitate logging we add a stringification function for
> 'ResourceProviderMessage's.
> 
> 
> Diffs
> -----
> 
>   src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521 
>   src/slave/slave.hpp 7d07868451e93d34ba694d40216c1e4036fd4094 
>   src/slave/slave.cpp 6d1516a5d5b5db684f79385e60d892ff75fd00fd 
>   src/tests/slave_tests.cpp 0a578ff0cf264999c95db8ccd16e6e52807fa070 
> 
> 
> Diff: https://reviews.apache.org/r/61183/diff/8/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


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