> On Oct. 20, 2016, 8:33 p.m., Jie Yu wrote: > > src/linux/cgroups.hpp, line 227 > > <https://reviews.apache.org/r/51031/diff/14/?file=1541968#file1541968line227> > > > > I would suggest we set default to true to match the previous semantics. > > haosdent huang wrote: > Since `cgroups::create` is > > ``` > Try<Nothing> create( > const std::string& hierarchy, > const std::string& cgroup, > bool recursive = false); > ``` > > Is it better to keep consistent on `recursive` parameter? > > Jiang Yan Xu wrote: > So Jie and I discussed on Slack. It's not obvious what the default for > the `get()` method should be non-recursive. Yes the asymmetry between > `create()` and `get()` feels inelegant. One way to fix this is to not have > defaults for both `create()` and `get()` at all but looking at > `os::mkdir(recursive=true)` and `os::rmdir(recursive=true)` I feel that > making `create()` and `get()` both default to `recursive` is probably the > most intuitive. We can follow up with another patch to turn `create()` to > default to `recursive=true`. > > haosdent huang wrote: > Oh, thx. Let me update and create a sperate ticket to trace > `cgroups::create`
Following patch is https://reviews.apache.org/r/53083/. - haosdent ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51031/#review153448 ----------------------------------------------------------- On Oct. 21, 2016, 10:14 a.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51031/ > ----------------------------------------------------------- > > (Updated Oct. 21, 2016, 10:14 a.m.) > > > Review request for mesos, Gilbert Song, Jie Yu, Qian Zhang, Zhengju Sha, and > Jiang Yan Xu. > > > Bugs: MESOS-6035 > https://issues.apache.org/jira/browse/MESOS-6035 > > > Repository: mesos > > > Description > ------- > > In some cases, we just want to get the children cgroups instead of > retrieve descendant cgroups recursively. We added an argument to > `cgroups::get` to indicate whether to retrieve cgroups recursively but > made recursive retrieve the default behaviour. This patch fixed some > incorrect `TEST_CGROUPS_ROOT` checks as well. > > > Diffs > ----- > > src/linux/cgroups.hpp cfce09cb57501f2c988a8d997d7c6150280ed53d > src/linux/cgroups.cpp 630e2ec2d0eac2bb35488d0416883df1601224c8 > src/tests/containerizer/cgroups_tests.cpp > 0afaec6ae948cabf1472bf01103210d8f9809cb1 > > Diff: https://reviews.apache.org/r/51031/diff/ > > > Testing > ------- > > > Thanks, > > haosdent huang > >
