-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1.0
-
Fix Version/s: 1.2.0
-
Component/s: libprocess
-
Labels:
-
Target Version/s:
-
Sprint:Mesosphere Sprint 48
The problem arises when one tries to associate an after() call to copied futures. The following test case is enough to reproduce the issue:
TEST(FutureTest, After3) { auto policy = std::make_shared<int>(0); { auto generator = []() { return Future<Nothing>(); }; Future<Nothing> future = generator() .after(Milliseconds(1), [policy](const Future<Nothing>&) { return Nothing(); }); AWAIT_READY(future); } EXPECT_EQ(1, policy.use_count()); }
In the test, one would expect that there is only one active reference to policy, therefore the expectation EXPECT_EQ(1, policy.use_count()). However, if after is triggered more than once, each extra call adds one undeleted reference to policy.
- relates to
-
MESOS-7043 FutureTest.After3 is flaky
-
- Resolved
-