> On Oct. 7, 2015, 7:41 a.m., Bernd Mathiske wrote: > > src/master/quota_handler.cpp, line 66 > > <https://reviews.apache.org/r/38059/diff/3/?file=1088987#file1088987line66> > > > > Given that we have the request object, we can output more diagnostic > > info here. > > Guangya Liu wrote: > I think that we can use BadRequest("Expecting POST"); instead, please > refer to https://github.com/apache/mesos/blob/master/src/master/http.cpp#L686 > > Alexander Rukletsov wrote: > We are using `BadRequest` in the caller. The intention is to send HTTP > responses only from the "entry" function, which processes the request > (`Master::QuotaHandler::request()`, will be renamed to > `Master::QuotaHandler::set()`). All callees return errors. Does it make sense?
Yes, but the argument of Error() here could include what the request was, so a human can inspect it in the log. Unless it is clear from the context that the request has already been logged. But I prefer context-free extra diagnostics :-) - Bernd ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38059/#review101764 ----------------------------------------------------------- On Nov. 5, 2015, 11:28 a.m., Alexander Rukletsov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/38059/ > ----------------------------------------------------------- > > (Updated Nov. 5, 2015, 11:28 a.m.) > > > Review request for mesos, Bernd Mathiske, Joerg Schad, Joris Van Remoortere, > and Joseph Wu. > > > Bugs: MESOS-3073 > https://issues.apache.org/jira/browse/MESOS-3073 > > > Repository: mesos > > > Description > ------- > > Processing quota request consists of several stages: request validation, > sanity check and so on. This patch creates a basic workflow for quota > requests, while the stages are implemented in subsequent patches. > > > Diffs > ----- > > src/master/master.hpp 3aa7017287506938d77bbfb1e06f510101009ee3 > src/master/quota_handler.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/38059/diff/ > > > Testing > ------- > > make check (Mac OS X 10.10.4) > > > Thanks, > > Alexander Rukletsov > >
