> On May 25, 2016, 1:27 a.m., Joseph Wu wrote: > > src/sched/sched.cpp, line 325 > > <https://reviews.apache.org/r/47804/diff/1/?file=1392955#file1392955line325> > > > > On inspection, there's another (rarer) leak that can appear if: > > > > 1) Master sends offers to the framework. > > 2) Network partition disconnects the framework. > > 3) Framework uses `acceptOffers` or `declinesOffers`. > > 4) Because the framework is `!connected`, both `acceptOffers` and > > `declinesOffers` exit early and do not modify `savedOffers`. > > > > It would be correct to clear `savedOffers` when the framework > > disconnects. (Because all offers become invalid.)
Nice comment! - haosdent ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47804/#review134675 ----------------------------------------------------------- On May 25, 2016, 12:51 a.m., Dario Rexin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47804/ > ----------------------------------------------------------- > > (Updated May 25, 2016, 12:51 a.m.) > > > Review request for mesos. > > > Bugs: https://issues.apache.org/jira/browse/MESOS-5449 > > https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/MESOS-5449 > > > Repository: mesos > > > Description > ------- > > MesosScheduler.declineOffers has been changed ~6 months ago to send a Decline > message instead of calling acceptOffers with an empty list of task infos. The > changed version of declineOffer however did not remove the offerId from the > savedOffers map, causing a memory leak. > > > Diffs > ----- > > src/sched/sched.cpp 9e55885 > > Diff: https://reviews.apache.org/r/47804/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Dario Rexin > >
