----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40392/#review107041 -----------------------------------------------------------
src/master/quota_handler.cpp (line 224) <https://reviews.apache.org/r/40392/#comment165936> I'm a bit concerned whether it's a good solution to put this flag in the request body. I'd say better alternatives are: - A single JSON object per request (with the `force` flag inside); - `force` flag in the URL. What do you think? src/tests/master_quota_tests.cpp (lines 129 - 134) <https://reviews.apache.org/r/40392/#comment165935> I assume you introduce a separate function because you want to allow (and test) `force=false` as well, otherwise a single method suffices: ``` string createRequestBody(const Resources& resources, bool force = false) const { string request = strings::format("resources=%s", JSON::protobuf( static_cast<const RepeatedPtrField<Resource>&>(resources))).get(); if (force) { request + "&force=" + stringify<bool>(force); } return request; } ``` However, we may still use a single method: ``` string createRequestBody(const Resources& resources, Option<bool> force) const ``` I think having a single method is cleaner and allow the reader to grasp all possibilities at once. src/tests/master_quota_tests.cpp (line 456) <https://reviews.apache.org/r/40392/#comment165937> This is not necessary any more. - Alexander Rukletsov On Nov. 17, 2015, 5:38 p.m., Joerg Schad wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40392/ > ----------------------------------------------------------- > > (Updated Nov. 17, 2015, 5:38 p.m.) > > > Review request for mesos, Alexander Rukletsov and Joris Van Remoortere. > > > Bugs: MESOS-3911 > https://issues.apache.org/jira/browse/MESOS-3911 > > > Repository: mesos > > > Description > ------- > > Added force flag to override quota capacityHeuristic check. > > > Diffs > ----- > > src/master/quota_handler.cpp 03cef4117c52da7599a2800060f65483ca33bc3f > src/tests/master_quota_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/40392/diff/ > > > Testing > ------- > > make check. > > > Thanks, > > Joerg Schad > >