----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47804/#review134675 -----------------------------------------------------------
Fix it, then Ship it! Note: You'll need add newlines to your description (< 72 characters per line). src/sched/sched.cpp (line 325) <https://reviews.apache.org/r/47804/#comment199534> 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.) src/sched/sched.cpp (line 1353) <https://reviews.apache.org/r/47804/#comment199535> Nit: Add a comment like: ``` // Remove the offer. We do not need to save any PIDs when declining an offer. ``` - Joseph Wu On May 24, 2016, 5:51 p.m., Dario Rexin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47804/ > ----------------------------------------------------------- > > (Updated May 24, 2016, 5:51 p.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 > >
