> On Oct. 2, 2019, 12:51 p.m., Meng Zhu wrote: > > src/master/allocator/mesos/hierarchical.hpp > > Lines 412 (patched) > > <https://reviews.apache.org/r/71488/diff/4/?file=2167266#file2167266line412> > > > > why do we need to track this in the agent? > > > > Also, need to include this change in the summary and description. > > Andrei Sekretenko wrote: > Two reasons: > 1. Now that MESOS-621 has been fixed, it is enough for master to call > `removeSlave()` on agent removal, no need to recover resources in the > allocator separately. I don't want to ruin this. > 2. Even if we require that master somehow notifies allocator about > allocated `Resources` on the agent being removed (so that we don't have to > track it in the allocator), we will have to choose between: > - requiring that this notification always happens before `removeSlave()` > (insanely fragile, IMO) > - treating a Role which doesn't have anything but allocated resources as > non-empty (currently, we just CHECK that an empty role does not have > allocated resources - this already helped me to avoid a bug or two). > > Added a comment, included into summary and description.
ah, missed the point that it is required for removeSlave. - Meng ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71488/#review218029 ----------------------------------------------------------- On Oct. 4, 2019, 11:30 a.m., Andrei Sekretenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71488/ > ----------------------------------------------------------- > > (Updated Oct. 4, 2019, 11:30 a.m.) > > > Review request for mesos, Benjamin Mahler and Meng Zhu. > > > Bugs: MESOS-9949 > https://issues.apache.org/jira/browse/MESOS-9949 > > > Repository: mesos > > > Description > ------- > > This patch adds tracking of per-role allocated resources in the > allocator's roles tree. Also, tracking of per-agent allocated resources > is added to facilitate correct untracking of the role's allocated > resources on agent removal. > > > Diffs > ----- > > src/master/allocator/mesos/hierarchical.hpp > d42124f534536ad044bff9878d242892fa042f24 > src/master/allocator/mesos/hierarchical.cpp > 47281542792486854b71c7e75dfa8ea3ee3ef3fc > > > Diff: https://reviews.apache.org/r/71488/diff/5/ > > > Testing > ------- > > > Thanks, > > Andrei Sekretenko > >
