----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65253/#review195919 -----------------------------------------------------------
Please add a test in the next review. src/master/master.hpp Line 1997 (original), 1997 (patched) <https://reviews.apache.org/r/65253/#comment275307> put the arg on the next line and align with others. also `const &`? src/master/master.hpp Lines 2002-2003 (patched) <https://reviews.apache.org/r/65253/#comment275309> `const &` ? src/master/master.cpp Line 11159 (original), 11160 (patched) <https://reviews.apache.org/r/65253/#comment275314> can you make this an rvalue ref as suggested by @bmahler offline? src/master/master.cpp Line 11205 (original), 11248 (patched) <https://reviews.apache.org/r/65253/#comment275310> put the arg on next line. src/master/master.cpp Line 11260 (original), 11292 (patched) <https://reviews.apache.org/r/65253/#comment275319> 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? - Vinod Kone On Jan. 22, 2018, 7:14 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, 7:14 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 > ------- > > The master's Subscribers::send() call path previously accessed > event-related master state after an asynchronous call. Thus, if > that state changed after the call to Subscribers::send() but > before the event was actually sent, messages could be dropped. > > > This patch updates that call path to capture a shared copy of > event-related metadata so that the asynchronous calls have a > consistent view of the master's state at the time of the event. > > > Diffs > ----- > > src/master/master.hpp 05136781b6b1539f37c283e8127e4bafb187a0d1 > src/master/master.cpp 3af96b1d2024ab1b951537ebc6bbc225cfa9cc88 > > > Diff: https://reviews.apache.org/r/65253/diff/2/ > > > Testing > ------- > > make check > > > Thanks, > > Greg Mann > >
