----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46822/#review132744 -----------------------------------------------------------
the summary and description in the review are incorrect. can you please update? src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (line 1272) <https://reviews.apache.org/r/46822/#comment196989> why do you need to do this namespacing? doesn't seem related to the rest of the patch? - Vinod Kone On May 11, 2016, 12:14 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46822/ > ----------------------------------------------------------- > > (Updated May 11, 2016, 12:14 p.m.) > > > Review request for mesos, Alexander Rukletsov, Joris Van Remoortere, Michael > Park, and Vinod Kone. > > > Bugs: MESOS-3335 > https://issues.apache.org/jira/browse/MESOS-3335 > > > Repository: mesos > > > Description > ------- > > While `FlagsBase` internally stores just maps of names and > flags, the functions stored in a `Flag` rely on the original type of > the `Flags` containing them (e.g., we perform dynamic casts to detect > their types). > > Since `Option<T>` stores `T` as a value (i.e., it cannot contain > reference types) any interface taking an `Option<T>` cannot rely on > polymorphic behavior of `T`. To make use of polymorphism we should > instead store e.g., a pointer type to avoid slicing. > > Here we change `Flags` arguments of `subprocess` to allow preserving > the original type so `Flag` function can work reliably. We do this by > passing a `Shared<Flags>` so we do not restrict copying; not that it > would also be possible to use an `Owned<Flags>`, but this would > require an audit of all sites where the arguments are used as > `Owned<T>` should not be copied, but do not prevent that on their own. > > > Diffs > ----- > > src/slave/container_loggers/lib_logrotate.cpp > 1f228806da32832c9ca1ae4defcd1bdc154adc18 > src/slave/containerizer/docker.cpp 7af14f4472283ceefd73c06dd8df60af4cf6f7e8 > src/slave/containerizer/mesos/containerizer.cpp > 75e5a32a3e70ec60a6800e21a621673184ea0956 > src/slave/containerizer/mesos/isolators/network/cni/cni.cpp > dae369aadb940150aa806b28d9269e3d88cf57ed > src/slave/containerizer/mesos/isolators/network/port_mapping.cpp > ad792def2bb3a1614d21ca28d858e400d2e3ede1 > src/slave/containerizer/mesos/launcher.hpp > 5977c30c0aacc569019f7b34bb0c6577823ec887 > src/slave/containerizer/mesos/launcher.cpp > a5c8c31b72773d0bd10b9d02675a01f1d641d41c > src/slave/containerizer/mesos/linux_launcher.hpp > 89bb2958a41dffe4ade9c2492b9a7412f90a432d > src/slave/containerizer/mesos/linux_launcher.cpp > 5028854fa003615f158120e030866b7ec4402b66 > src/tests/containerizer/launch_tests.cpp > 3e36f2f7ab89b98de2c1a971e4ecca58c13ad642 > src/tests/containerizer/launcher.hpp > c352634c4766d289706c7cc738677619d7d02ccd > src/tests/containerizer/port_mapping_tests.cpp > 21ad1e1c53316a3bb6d914aa228ccf3658acdfbf > > Diff: https://reviews.apache.org/r/46822/diff/ > > > Testing > ------- > > Tested on various platforms in internal CI. > > > Thanks, > > Benjamin Bannier > >
