----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64070/#review194091 -----------------------------------------------------------
src/executor/v0_v1executor.cpp Lines 155 (patched) <https://reviews.apache.org/r/64070/#comment272808> Is it safe for the executor to get `connected` callback after it is already connected? I'm thinking of the case where connect was just called, but the executor hasn't send a SUBSCRIBE call yet and we are in this situation. Just want to make sure. Also, can you add a comment here explaining why you are doing a `connected` here for posterity? - Vinod Kone On Dec. 4, 2017, 6:04 p.m., Alexander Rukletsov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64070/ > ----------------------------------------------------------- > > (Updated Dec. 4, 2017, 6:04 p.m.) > > > Review request for mesos, Andrei Budnik, Anand Mazumdar, Armand Grillet, and > Vinod Kone. > > > Repository: mesos > > > Description > ------- > > Prior to this patch, if an error or shutdown occurred during > subscription / registration with the agent, it was not propagated back > to the executor if the v0_v1 executor adapter was used. This happened > because the adapter did not call the `connected` callback until after > successful registration and hence the executor did not even try to > send the `SUBSCRIBE` call, without which the adapter did not send any > events to the executor. > > A fix is to call the `connected` callback if an error occurred or > shutdown even arrived before the executor had subscribed. > > > Diffs > ----- > > src/executor/v0_v1executor.cpp 61d591993e6388ba3b4d64a3bdb63c3a3513fbeb > > > Diff: https://reviews.apache.org/r/64070/diff/1/ > > > Testing > ------- > > See https://reviews.apache.org/r/64033/ > > > Thanks, > > Alexander Rukletsov > >