You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/11/09 09:16:02 UTC
[GitHub] [geode] jvarenina commented on a change in pull request #6036: GEODE-8856: Persist gateway-sender state
jvarenina commented on a change in pull request #6036:
URL: https://github.com/apache/geode/pull/6036#discussion_r745421799
##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -972,15 +968,24 @@ public void testPersistentPRWithPersistentGatewaySender_Restart_DoOps() {
LogWriterUtils.getLogWriter().info("Created the senders back from the disk store.");
- // create PR on local site
- vm4.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
- 100, isOffHeap()));
- vm5.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
- 100, isOffHeap()));
- vm6.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
- 100, isOffHeap()));
- vm7.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
- 100, isOffHeap()));
+ AsyncInvocation inv1 = vm4.invokeAsync(() -> WANTestBase
+ .createPersistentPartitionedRegion(getTestMethodName(), "ln", 1, 100, isOffHeap()));
+ AsyncInvocation inv2 = vm5.invokeAsync(() -> WANTestBase
+ .createPersistentPartitionedRegion(getTestMethodName(), "ln", 1, 100, isOffHeap()));
+ AsyncInvocation inv3 = vm6.invokeAsync(() -> WANTestBase
+ .createPersistentPartitionedRegion(getTestMethodName(), "ln", 1, 100, isOffHeap()));
+ AsyncInvocation inv4 = vm7.invokeAsync(() -> WANTestBase
+ .createPersistentPartitionedRegion(getTestMethodName(), "ln", 1, 100, isOffHeap()));
+
+ try {
+ inv1.join();
+ inv2.join();
+ inv3.join();
+ inv4.join();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ fail();
+ }
Review comment:
Hi @kirklund ,
In this particular case I have to use asynchronous creation of region, otherwise test fails with following log:
`[vm4] [info 2021/11/09 09:53:11.278 CET <PersistentBucketRecoverer for region ln_PARALLEL_GATEWAY_SENDER_QUEUE> tid=0xbe] Region /testPersistentPRWithPersistentGatewaySender_Restart_DoOps (and any colocated sub-regions) has potentially stale data. Buckets [1, 4, 5, 9, 10, 12, 13, 14, 16, 20, 24, 25, 26, 27, 30, 31, 33, 34, 36, 38, 41, 43, 44, 45, 46, 49, 50, 54, 55, 56, 60, 61, 62, 63, 65, 68, 69, 71, 73, 76, 79, 81, 83, 85, 88, 92, 94, 95, 97, 98] are waiting for another offline member to recover the latest data. My persistent id is:`
This happens because now gateway sender queue region is recovered right after main region is created. I will update the test as you suggested to use `AsyncInvocation<Void>` and `await()`.
You have more information related to this in following comment: https://github.com/apache/geode/pull/6036#discussion_r642882417
Hope this is OK to you?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org