mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anand Mazumdar" <mazumdar.an...@gmail.com>
Subject Re: Review Request 41283: Introduced an Executor Library based on the new executor HTTP API.
Date Tue, 29 Dec 2015 06:22:13 GMT


> On Dec. 29, 2015, 6:09 a.m., Jojy Varghese wrote:
> > src/executor/executor.cpp, line 354
> > <https://reviews.apache.org/r/41283/diff/3/?file=1177137#file1177137line354>
> >
> >     What is the purpose of mutex? It looks like we do the callbacks asynchronously.
Which means, we have the lock only till its dispatched. We dont know when its executed. So
wouldnt that mean two callbacks can be executed asyncronously at the same time?

Can you elaborate a bit more ? If you have a look at the implementation of `async` the `Future`
is only fullfilled once the callback has been successfully invoked not **before**. Hence,
the mutex is only unlocked after the callback is **completed**. 

https://github.com/apache/mesos/blob/master/3rdparty/libprocess/include/process/async.hpp#L93

The scheduler library also follows a similar pattern for invoking the callbacks : https://github.com/apache/mesos/blob/master/src/scheduler/scheduler.cpp

Hope this info helps.


- Anand


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


On Dec. 29, 2015, 3:11 a.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41283/
> -----------------------------------------------------------
> 
> (Updated Dec. 29, 2015, 3:11 a.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-3550
>     https://issues.apache.org/jira/browse/MESOS-3550
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This change introduces the implementation for the executor library. 
> 
> This uses the new HTTP Connection interface to ensure calls are properly pipelined.
> 
> `connected` -> Callback invoked when a TCP connection is established with the agent.
> `disconnected` -> When the TCP connection is interrupted possibly due to an agent
restart.
> `received` -> When the executor receives events from the agent upon subscribing.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 9762f8567e32d70b8df2d694a1fef5c692fc730e 
>   src/executor/executor.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41283/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>


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