----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/14383/#review28166 -----------------------------------------------------------
src/master/registrar.cpp <https://reviews.apache.org/r/14383/#comment54796> I missed this earlier but this technique is incorrect: Remove X _ X A B C 0 1 2 3 4 Swap(1, 2); // _ A X B C Swap(1, 3); // _ B X A C Swap(1, 4); // _ C X A B The tests missed this by only using 2 slave infos, in which case this happens to work. i must be incremented alongside j in this loop. I think the O(1) solution of swapping with the last element is simpler and easier to follow. - Ben Mahler On Sept. 28, 2013, 12:32 a.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/14383/ > ----------------------------------------------------------- > > (Updated Sept. 28, 2013, 12:32 a.m.) > > > Review request for mesos, Ben Mahler and Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > See summary > > > Diffs > ----- > > src/Makefile.am ee336130ad93d8b524c841f75be36f00d4a2b147 > src/master/registrar.hpp PRE-CREATION > src/master/registrar.cpp PRE-CREATION > src/master/registry.proto 877bfa1465371f035f5d31606554415146d0c307 > src/tests/registrar_tests.cpp PRE-CREATION > src/tests/state_tests.cpp f39dee549ccd959f451bdfedba74837934376443 > > Diff: https://reviews.apache.org/r/14383/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
