> On April 15, 2015, 7:20 p.m., Ben Mahler wrote: > > src/master/master.hpp, lines 1138-1143 > > <https://reviews.apache.org/r/31665/diff/5/?file=927382#file927382line1138> > > > > Thanks for this NOTE! We might want to take this opportunity to > > articulate why we can safely keep the totals. Or, should we strip > > non-scalars and store a 'totalUsedScalarResources'? > > Michael Park wrote: > We can't do the former since we can't safely keep the totals. We might > want to do something like the latter but I think we may break some people > that way, and therefore should be done as a subsequent task. I've created > [MESOS-2623](https://issues.apache.org/jira/browse/MESOS-2623) to track this. > > Ben Mahler wrote: > > We can't do the former since we can't safely keep the totals. > > Ah ok great, can we articulate why for posterity? It's not immediately > obvious to me. As in, is there a bug due to this? Or is it just that the > non-scalar information is not correct, and there's not yet a bug due to this > since we only expose scalars? Something else?
Answered to your comment below. In short, if you mean __safe__ as in we don't crash then yes it's safe. There __is__ a bug due to this since the non-scalar information is not correct and we do expose non-scalar resources. - Michael ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31665/#review80252 ----------------------------------------------------------- On April 15, 2015, 10:45 p.m., Michael Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31665/ > ----------------------------------------------------------- > > (Updated April 15, 2015, 10:45 p.m.) > > > Review request for mesos, Alexander Rukletsov and Ben Mahler. > > > Bugs: MESOS-2373 > https://issues.apache.org/jira/browse/MESOS-2373 > > > Repository: mesos > > > Description > ------- > > `master::Framework` holds 2 member variables of type `Resources`: > `usedResources` and `offeredResources`. Both of these are aggregates of > resources from multiple slaves. We add the `hashmap<SlaveID, Resources>` > versions since we can lose non-scalar resources by summing them up across > multiple slaves. For further details refer to > [MESOS-2373](https://issues.apache.org/jira/browse/MESOS-2373). > > In [r31666](https://reviews.apache.org/r/31666/), we report > `usedResourcesBySlaveId` rather than `usedResources` when adding the > framework to the allocator. > > We don't actually use `offeredResourcesBySlaveId` currently, but it should be > kept for symmetry. There will be a ticket to expose `usedResourcesBySlaveId` > as well as `offeredResourcesBySlaveId` via the HTTP endpoint. > > > Diffs > ----- > > src/master/master.hpp 6141917644b84edfed9836fa0a005d55a36880e3 > > Diff: https://reviews.apache.org/r/31665/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Michael Park > >