> On Nov. 6, 2017, 6:51 p.m., Greg Mann wrote:
> > src/slave/slave.cpp
> > Lines 1280-1287 (patched)
> > <https://reviews.apache.org/r/61183/diff/21/?file=1881892#file1881892line1280>
> >
> >     It would be nice if we only did this when necessary - i.e., if there 
> > have, in fact, been additional RP registrations. The agent could keep an 
> > optional list of RPs which register/update during that period; I think it 
> > would be pretty easy to insert them in the  handleResourceProviderMessage 
> > handler when the agent isn't registered. Here, and in reregistered().
> >     
> >     Do you think it's worth it?

Let's keep this as is for now. Since `UpdateSlaveMessage` only updates resource 
versions for added/changed RPs, the only effect it would have on the master 
side would be to invalidate outstanding offers for that agent. Let's optimize 
it when we need to, especially since, like you wrote, this might involve 
tracking additional state.


> On Nov. 6, 2017, 6:51 p.m., Greg Mann wrote:
> > src/tests/slave_tests.cpp
> > Lines 8529-8531 (patched)
> > <https://reviews.apache.org/r/61183/diff/21/?file=1881893#file1881893line8529>
> >
> >     "of for the interaction with the usual oversubscription protocol" - I'm 
> > not sure what you're saying here, could you re-word?

`s/of/or/`


- Benjamin


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


On Nov. 7, 2017, 1:25 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61183/
> -----------------------------------------------------------
> 
> (Updated Nov. 7, 2017, 1:25 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.
> 
> 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.
> 
> This patch also adjusts a number of tests to no expect two
> 'UpdateSlaveMessage's.
> 
> 
> Diffs
> -----
> 
>   src/resource_provider/message.hpp 3c7c3f2baeb726e04edd6ffbb9784699d7afe521 
>   src/slave/slave.hpp df1b0205124555dcb6a0efa5c237f5e77fa2bdf7 
>   src/slave/slave.cpp 79ee163b41ade93cae1054985379d61faf6a081a 
>   src/tests/slave_tests.cpp 9c2db7adf45af4209ecc475d938ce4b77c5a3ab4 
> 
> 
> Diff: https://reviews.apache.org/r/61183/diff/22/
> 
> 
> Testing
> -------
> 
> Tested on a number of platforms on internal CI.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>

Reply via email to