Re: Review Request 65640: Fixed leaks and a race condition in `UriDiskProfileAdaptorTests`.

2018-04-23 Thread Joseph Wu

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




src/tests/disk_profile_adaptor_tests.cpp
Lines 453-457 (original), 451-457 (patched)


FYI: I'm going to commit the leak fixes immediately as these leaks are 
causing ~200 extranous error log lines per build/test run.


- Joseph Wu


On April 11, 2018, 8:37 p.m., Chun-Hung Hsiao wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65640/
> ---
> 
> (Updated April 11, 2018, 8:37 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Benjamin Bannier, Jie Yu, and 
> Joseph Wu.
> 
> 
> Bugs: MESOS-8567
> https://issues.apache.org/jira/browse/MESOS-8567
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> There was a race between `Clock::advance()` in the `FetchFromHTTP` test
> and `delay()` in `UriDiskProfileAdaptorProcess::_poll`. This patch
> avoids the race by enforcing an order between the dispatch of the
> `__poll` function (previously `_poll`) and the clock manipulation
> in the test. It also fixed two memory leaks in the test.
> 
> 
> Diffs
> -
> 
>   src/Makefile.am 257ff0e8d21e5240c27a123ed0cd563214e24fce 
>   src/resource_provider/storage/uri_disk_profile_adaptor.hpp 
> 0484933b42d0bd66c689b06cb48f492eef7bc606 
>   src/resource_provider/storage/uri_disk_profile_adaptor.cpp 
> 300ea12687de487737ce91066ab4e74d9b3430e6 
>   src/tests/disk_profile_adaptor_tests.cpp 
> 948f6efc916d6fad0703944ad9acb77d85e4c25e 
> 
> 
> Diff: https://reviews.apache.org/r/65640/diff/4/
> 
> 
> Testing
> ---
> 
> sudo make check
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>



Re: Review Request 65640: Fixed leaks and a race condition in `UriDiskProfileAdaptorTests`.

2018-04-11 Thread Chun-Hung Hsiao

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

(Updated April 12, 2018, 3:37 a.m.)


Review request for mesos, Alexander Rukletsov, Benjamin Bannier, Jie Yu, and 
Joseph Wu.


Changes
---

Rebased.


Bugs: MESOS-8567
https://issues.apache.org/jira/browse/MESOS-8567


Repository: mesos


Description
---

There was a race between `Clock::advance()` in the `FetchFromHTTP` test
and `delay()` in `UriDiskProfileAdaptorProcess::_poll`. This patch
avoids the race by enforcing an order between the dispatch of the
`__poll` function (previously `_poll`) and the clock manipulation
in the test. It also fixed two memory leaks in the test.


Diffs (updated)
-

  src/Makefile.am 257ff0e8d21e5240c27a123ed0cd563214e24fce 
  src/resource_provider/storage/uri_disk_profile_adaptor.hpp 
0484933b42d0bd66c689b06cb48f492eef7bc606 
  src/resource_provider/storage/uri_disk_profile_adaptor.cpp 
300ea12687de487737ce91066ab4e74d9b3430e6 
  src/tests/disk_profile_adaptor_tests.cpp 
948f6efc916d6fad0703944ad9acb77d85e4c25e 


Diff: https://reviews.apache.org/r/65640/diff/4/

Changes: https://reviews.apache.org/r/65640/diff/3-4/


Testing
---

sudo make check


Thanks,

Chun-Hung Hsiao



Re: Review Request 65640: Fixed leaks and a race condition in `UriDiskProfileAdaptorTests`.

2018-03-19 Thread Chun-Hung Hsiao

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

(Updated March 20, 2018, 3:23 a.m.)


Review request for mesos, Alexander Rukletsov, Benjamin Bannier, Jie Yu, and 
Joseph Wu.


Changes
---

Rebased.


Summary (updated)
-

Fixed leaks and a race condition in `UriDiskProfileAdaptorTests`.


Bugs: MESOS-8567
https://issues.apache.org/jira/browse/MESOS-8567


Repository: mesos


Description
---

There was a race between `Clock::advance()` in the `FetchFromHTTP` test
and `delay()` in `UriDiskProfileAdaptorProcess::_poll`. This patch
avoids the race by enforcing an order between the dispatch of the
`__poll` function (previously `_poll`) and the clock manipulation
in the test. It also fixed two memory leaks in the test.


Diffs (updated)
-

  src/Makefile.am 84753794eca822ab251200cccb907b328c849fb7 
  src/resource_provider/storage/uri_disk_profile_adaptor.hpp PRE-CREATION 
  src/resource_provider/storage/uri_disk_profile_adaptor.cpp 
665798fdb085ea34f93bd287fe6f9ab29a265cbf 
  src/tests/disk_profile_adaptor_tests.cpp 
577ccfe9614009ba4178886c100de22ff12047b6 


Diff: https://reviews.apache.org/r/65640/diff/3/

Changes: https://reviews.apache.org/r/65640/diff/2-3/


Testing
---

sudo make check


Thanks,

Chun-Hung Hsiao