> On July 3, 2016, 11:35 p.m., Vinod Kone wrote: > > src/master/http.cpp, line 596 > > <https://reviews.apache.org/r/49518/diff/1-3/?file=1435013#file1435013line596> > > > > why `mutable` here?
Because `Connection::send` function is not `const`. > On July 3, 2016, 11:35 p.m., Vinod Kone wrote: > > src/master/http.cpp, line 598 > > <https://reviews.apache.org/r/49518/diff/1-3/?file=1435013#file1435013line598> > > > > what's the guarantee that this is executed before any other streaming > > event is sent? Good catch. I think we should move the line of `master->subscribe(http);` back after the send() call, so that if an event generating action like `taskUpdate` is queued before the `_getState()` call, we still guarantee that. Also, the callback lambda must be executed _synchronously_, otherwise an event queued in the middle of `_getState()` execution and lamdba execution would not be captured in snapshot, or sent by stream. I'd like to leave a Note comment for this. Please let me know if my understanding is incorrect or you think it's not worth it. - Zhitao ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/49518/#review140593 ----------------------------------------------------------- On July 3, 2016, 7:35 a.m., Zhitao Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/49518/ > ----------------------------------------------------------- > > (Updated July 3, 2016, 7:35 a.m.) > > > Review request for mesos, Anand Mazumdar, haosdent huang, and Vinod Kone. > > > Bugs: MESOS-5498 > https://issues.apache.org/jira/browse/MESOS-5498 > > > Repository: mesos > > > Description > ------- > > Initial snapshot for v1 master event stream. > > > Diffs > ----- > > include/mesos/master/master.proto d06258e9fd39c7eefd8ecd394e3bdfb888479b1e > include/mesos/v1/master/master.proto > b7cb6fdf2e4f34a11d326ac3ad3ec26525f8f343 > src/master/http.cpp 7b2f77b9264242f31ab62eb9db7c621a1b8aa2fe > src/tests/api_tests.cpp e2d8bf591667ec9d8c609e55a424b55561892b5f > > Diff: https://reviews.apache.org/r/49518/diff/ > > > Testing > ------- > > Updated test and make check. > > > Thanks, > > Zhitao Li > >