> On Jan. 22, 2018, 7:26 p.m., Vinod Kone wrote:
> > src/master/master.cpp
> > Line 11260 (original), 11292 (patched)
> > <https://reviews.apache.org/r/65253/diff/1/?file=1943774#file1943774line11308>
> >
> >     So looks like we do make a copy of the event for 
> > `FRAMEWORK_{ADDED,UPDATED_REMOVED}` and `AGENT_ADDED` after all. By taking 
> > Event as Shared we are only avoiding copies for `TASK_{ADDED,UPDATED}` and 
> > `AGENT_REMOVED`. 
> >     
> >     A bit inconsistent, but I guess worth it for the perf improvement?

Indeed, we do copy the event for those event types in order to provide 
authorization-based filtering. However, we could optimize this code by building 
a new event from scratch rather than copying the original and clearing fields. 
I can follow up with a patch for this optimization.

Using `Shared` allows us to eliminate additional copies from the lambda capture 
in `Subscribers::send()`.


- Greg


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


On Jan. 22, 2018, 8:39 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65253/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2018, 8:39 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Benjamin Mahler, and Vinod Kone.
> 
> 
> Bugs: MESOS-8469
>     https://issues.apache.org/jira/browse/MESOS-8469
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Avoided dropping events on the master operator API stream.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp 05136781b6b1539f37c283e8127e4bafb187a0d1 
>   src/master/master.cpp 3af96b1d2024ab1b951537ebc6bbc225cfa9cc88 
> 
> 
> Diff: https://reviews.apache.org/r/65253/diff/4/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Greg Mann
> 
>

Reply via email to