You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Jianxia Chen <jc...@pivotal.io> on 2016/05/10 22:58:30 UTC

Review Request 47195: GEODE-699 PartitionedRegionSingleHopDUnitTest.test_MetadataServiceCallAccuracy

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

Review request for geode, Bruce Schuchardt, Hitesh Khamesra, and Udo Kohlmeyer.


Repository: geode


Description
-------

When the fetch task threads are spawned in the client metadata service for single hop, It is possible that certain thread is still lingering during the second round of PUTs, which assumes all such fetch tasks should be completed at that time. The lingering thread causes the flag to be set, which results in test failure. 

The fix tries to shutdown the ExecutorService and make sure all fetch task threads are terminated before the second round of PUTs. So that there is no unexpected flag change in the second round.


Diffs
-----

  geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/SingleHopClientExecutor.java 30cac5b 
  geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java 399f1ca 

Diff: https://reviews.apache.org/r/47195/diff/


Testing
-------


Thanks,

Jianxia Chen


Re: Review Request 47195: GEODE-699 PartitionedRegionSingleHopDUnitTest.test_MetadataServiceCallAccuracy

Posted by Bruce Schuchardt <bs...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47195/#review132676
-----------------------------------------------------------


Ship it!




Ship It!

- Bruce Schuchardt


On May 10, 2016, 10:58 p.m., Jianxia Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47195/
> -----------------------------------------------------------
> 
> (Updated May 10, 2016, 10:58 p.m.)
> 
> 
> Review request for geode, Bruce Schuchardt, Hitesh Khamesra, and Udo Kohlmeyer.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> When the fetch task threads are spawned in the client metadata service for single hop, It is possible that certain thread is still lingering during the second round of PUTs, which assumes all such fetch tasks should be completed at that time. The lingering thread causes the flag to be set, which results in test failure. 
> 
> The fix tries to shutdown the ExecutorService and make sure all fetch task threads are terminated before the second round of PUTs. So that there is no unexpected flag change in the second round.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/SingleHopClientExecutor.java 30cac5b 
>   geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java 399f1ca 
> 
> Diff: https://reviews.apache.org/r/47195/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jianxia Chen
> 
>


Re: Review Request 47195: GEODE-699 PartitionedRegionSingleHopDUnitTest.test_MetadataServiceCallAccuracy

Posted by Udo Kohlmeyer <uk...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47195/#review133006
-----------------------------------------------------------


Ship it!




Ship It!

- Udo Kohlmeyer


On May 12, 2016, 10:45 p.m., Jianxia Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47195/
> -----------------------------------------------------------
> 
> (Updated May 12, 2016, 10:45 p.m.)
> 
> 
> Review request for geode, Bruce Schuchardt, Hitesh Khamesra, and Udo Kohlmeyer.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> When the fetch task threads are spawned in the client metadata service for single hop, It is possible that certain thread is still lingering during the second round of PUTs, which assumes all such fetch tasks should be completed at that time. The lingering thread causes the flag to be set, which results in test failure. 
> 
> The fix tries to shutdown the ExecutorService and make sure all fetch task threads are terminated before the second round of PUTs. So that there is no unexpected flag change in the second round.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientMetadataService.java ed26708 
>   geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java f79d6c6 
> 
> Diff: https://reviews.apache.org/r/47195/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jianxia Chen
> 
>


Re: Review Request 47195: GEODE-699 PartitionedRegionSingleHopDUnitTest.test_MetadataServiceCallAccuracy

Posted by Hitesh Khamesra <hk...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47195/#review132996
-----------------------------------------------------------


Ship it!




Ship It!

- Hitesh Khamesra


On May 12, 2016, 10:45 p.m., Jianxia Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47195/
> -----------------------------------------------------------
> 
> (Updated May 12, 2016, 10:45 p.m.)
> 
> 
> Review request for geode, Bruce Schuchardt, Hitesh Khamesra, and Udo Kohlmeyer.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> When the fetch task threads are spawned in the client metadata service for single hop, It is possible that certain thread is still lingering during the second round of PUTs, which assumes all such fetch tasks should be completed at that time. The lingering thread causes the flag to be set, which results in test failure. 
> 
> The fix tries to shutdown the ExecutorService and make sure all fetch task threads are terminated before the second round of PUTs. So that there is no unexpected flag change in the second round.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientMetadataService.java ed26708 
>   geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java f79d6c6 
> 
> Diff: https://reviews.apache.org/r/47195/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jianxia Chen
> 
>


Re: Review Request 47195: GEODE-699 PartitionedRegionSingleHopDUnitTest.test_MetadataServiceCallAccuracy

Posted by Jianxia Chen <jc...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47195/
-----------------------------------------------------------

(Updated May 12, 2016, 10:45 p.m.)


Review request for geode, Bruce Schuchardt, Hitesh Khamesra, and Udo Kohlmeyer.


Changes
-------

Add a counter fetchTaskCount in ClientMetadataService to count the number fetch task threads. Make sure the counter is increased before a fetch task thread is scheduled. And decrease the counter when a thread is done.

In the test, use Awaitility to make all fetch tasks threads are completed, i.e. fetchTaskCount == 0, before the next step.

Note that this patch also fixes GEODE-493, whose root cause is the same as GEODE-699.


Repository: geode


Description
-------

When the fetch task threads are spawned in the client metadata service for single hop, It is possible that certain thread is still lingering during the second round of PUTs, which assumes all such fetch tasks should be completed at that time. The lingering thread causes the flag to be set, which results in test failure. 

The fix tries to shutdown the ExecutorService and make sure all fetch task threads are terminated before the second round of PUTs. So that there is no unexpected flag change in the second round.


Diffs (updated)
-----

  geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientMetadataService.java ed26708 
  geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java f79d6c6 

Diff: https://reviews.apache.org/r/47195/diff/


Testing
-------


Thanks,

Jianxia Chen


Re: Review Request 47195: GEODE-699 PartitionedRegionSingleHopDUnitTest.test_MetadataServiceCallAccuracy

Posted by Jianxia Chen <jc...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47195/
-----------------------------------------------------------

(Updated May 11, 2016, 6:20 p.m.)


Review request for geode, Bruce Schuchardt, Hitesh Khamesra, and Udo Kohlmeyer.


Changes
-------

Previous diff may cause some tests to fail, since the ExecutorService is shutdown, it will not receive any new submission for other tests. One way to fix it is to use ExecutorCompletionService to make sure all fetch tasks are completed before second round of PUTs. However, such kind of change of product code is unnecessary. GEODE-699 is essentially a test issue, not a product bug. There is no need to change product code for the test to pass. So just change the tests to remove second round of PUTs.


Repository: geode


Description
-------

When the fetch task threads are spawned in the client metadata service for single hop, It is possible that certain thread is still lingering during the second round of PUTs, which assumes all such fetch tasks should be completed at that time. The lingering thread causes the flag to be set, which results in test failure. 

The fix tries to shutdown the ExecutorService and make sure all fetch task threads are terminated before the second round of PUTs. So that there is no unexpected flag change in the second round.


Diffs (updated)
-----

  geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java f79d6c6 

Diff: https://reviews.apache.org/r/47195/diff/


Testing
-------


Thanks,

Jianxia Chen


Re: Review Request 47195: GEODE-699 PartitionedRegionSingleHopDUnitTest.test_MetadataServiceCallAccuracy

Posted by Hitesh Khamesra <hk...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47195/#review132680
-----------------------------------------------------------


Ship it!




Ship It!

- Hitesh Khamesra


On May 10, 2016, 10:58 p.m., Jianxia Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47195/
> -----------------------------------------------------------
> 
> (Updated May 10, 2016, 10:58 p.m.)
> 
> 
> Review request for geode, Bruce Schuchardt, Hitesh Khamesra, and Udo Kohlmeyer.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> When the fetch task threads are spawned in the client metadata service for single hop, It is possible that certain thread is still lingering during the second round of PUTs, which assumes all such fetch tasks should be completed at that time. The lingering thread causes the flag to be set, which results in test failure. 
> 
> The fix tries to shutdown the ExecutorService and make sure all fetch task threads are terminated before the second round of PUTs. So that there is no unexpected flag change in the second round.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/SingleHopClientExecutor.java 30cac5b 
>   geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java 399f1ca 
> 
> Diff: https://reviews.apache.org/r/47195/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jianxia Chen
> 
>