> On 九月 11, 2015, 3:09 a.m., haosdent huang wrote:
> > src/linux/cgroups.cpp, line 2440
> > <https://reviews.apache.org/r/38287/diff/1/?file=1067958#file1067958line2440>
> >
> >     Does this fall into a loop?
> 
> Jian Qiu wrote:
>     Does not quite catch your point :) if you mean the loop in 
> internal::Freezer::freeze, I think it does not.
> 
> haosdent huang wrote:
>     Oh, I mean if future keep failed, does this fall into a infinite loop?

OK, I think it will not fall into a loop. Based on the test case

TEST_F(CgroupsAnyHierarchyWithCpuMemoryTest, ROOT_CGROUPS_FreezeNonFreezer)
{
  string hierarchy = path::join(baseHierarchy, "cpu");
  ASSERT_SOME(cgroups::create(hierarchy, TEST_CGROUPS_ROOT));

  AWAIT_EXPECT_FAILED(cgroups::freezer::freeze(hierarchy, TEST_CGROUPS_ROOT));
  AWAIT_EXPECT_FAILED(cgroups::freezer::thaw(hierarchy, TEST_CGROUPS_ROOT));

  // The cgroup is empty so we should still be able to destroy it.
  AWAIT_READY(cgroups::destroy(hierarchy, TEST_CGROUPS_ROOT));
}

This function will just return failed future.


- Jian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38287/#review98540
-----------------------------------------------------------


On 九月 11, 2015, 3:05 a.m., Jian Qiu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38287/
> -----------------------------------------------------------
> 
> (Updated 九月 11, 2015, 3:05 a.m.)
> 
> 
> Review request for mesos, Ian Downes, Jie Yu, and Paul Brett.
> 
> 
> Bugs: MESOS-3272
>     https://issues.apache.org/jira/browse/MESOS-3272
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This check in cgroups::freezer::freeze() is necessary
> since the freezer process can be terminated in its
> initialize method
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.cpp 6ef42ed1bc719f334d1ac6e90919a1bc1840d31f 
> 
> Diff: https://reviews.apache.org/r/38287/diff/
> 
> 
> Testing
> -------
> 
> ./mesos-tests.sh 
> --gtest_filter="CgroupsAnyHierarchyWithCpuMemoryTest.ROOT_CGROUPS_FreezeNonFreezer"
>  --verbose
> 
> 
> Thanks,
> 
> Jian Qiu
> 
>

Reply via email to