> On Dec. 7, 2017, 6:33 p.m., Jie Yu wrote: > > src/slave/slave.cpp > > Lines 2299-2322 (patched) > > <https://reviews.apache.org/r/64299/diff/1/?file=1907374#file1907374line2299> > > > > I'd suggest you combine this with that right below (line 2363). For > > instance, we forgot that we cannot send TASK_DROPPED if framework is not > > partition aware. > > > > We probably should move the LOG(INFO) about launching tasks below all > > those checks. > > > > Also, I feel that we can probably combine some other checks too. I saw > > this code being duplicated three times in this function :(
I changed the code to follow to same validation pattern as used below (set a `kill`, conditionally kill the task. In order to remove duplication here we need to also take care of passing along the respeactive reasons and diagnostic messages. I added a `TODO` to capture this. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64299/#review193136 ----------------------------------------------------------- On Dec. 7, 2017, 8:04 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64299/ > ----------------------------------------------------------- > > (Updated Dec. 7, 2017, 8:04 p.m.) > > > Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht. > > > Bugs: MESOS-8222 > https://issues.apache.org/jira/browse/MESOS-8222 > > > Repository: mesos > > > Description > ------- > > In this patch we inject resource versions into task launch messages > and add verification in the agent. We require that resource versions > of resource providers whose resources are used in a task have not > changed. With that we can make sure to e.g., not use resources created > in speculated operations. > > > Diffs > ----- > > src/master/master.cpp 2fd66c072e9a194680d7653c664bd8a68ea1d2f0 > src/slave/slave.hpp fc762fb1e8aeb57b0d7ad551d960ec4be06e8e33 > src/slave/slave.cpp dd830d93f8a08720231e3d4a6421f7a058ba6093 > src/tests/mock_slave.hpp d986125b3ab67e0ca3d6ba264795850b3eadb3d0 > src/tests/mock_slave.cpp 6d050ca76acee737f1996fbbd8ecdefbf1a699ee > src/tests/slave_tests.cpp 25cfd4730c3d77d1886745204b13ca3cb140620c > > > Diff: https://reviews.apache.org/r/64299/diff/2/ > > > Testing > ------- > > `make check` > > > Thanks, > > Benjamin Bannier > >
