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 2020/11/14 18:08:50 UTC

[GitHub] [geode] mivanac opened a new pull request #5752: GEODE-8714: return event to queue at stoping of gw sender

mivanac opened a new pull request #5752:
URL: https://github.com/apache/geode/pull/5752


   Do not review
   
   
   
   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [*] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [*] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [*] Is your initial contribution a single, squashed commit?
   
   - [*] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] pivotal-amurmann commented on pull request #5752: GEODE-8714: return event to queue at stoping of gw sender

Posted by GitBox <gi...@apache.org>.
pivotal-amurmann commented on pull request #5752:
URL: https://github.com/apache/geode/pull/5752#issuecomment-729907238


   @mivanac I agree that all usage of deprecated functionality should be cleaned up. Unfortunately, that would take a long time. As @kohlmu-pivotal points out, we as a community need to work to make it better over time and not move us further away from our goal.
   
   Please call out if you see other PRs that are also moving us away from a cleaner, more stable, more maintainable code base!


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans commented on a change in pull request #5752: GEODE-8714: return event to queue at stoping of gw sender

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on a change in pull request #5752:
URL: https://github.com/apache/geode/pull/5752#discussion_r525594202



##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -1897,6 +1897,106 @@ public void testpersistentWanGateway_restartSender_expectAllEventsReceived_scena
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 3000));
   }
 
+  /**
+   * Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
+   * then stop gateway sender, and stop server. After that create receiver on remote site.
+   * Check if the remote site receives all the events.
+   */
+  @Test
+  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
+    // create locator on local site
+    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
+    // create locator on remote site
+    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
+
+    // create receiver on remote site
+    createCacheInVMs(nyPort, vm2, vm3);
+    // createReceiverInVMs(vm2, vm3);
+
+    // create cache in local site
+    createCacheInVMs(lnPort, vm4, vm5);
+    vm4.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    // create senders with disk store
+    String diskStore1 = (String) vm4.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+    String diskStore2 = (String) vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+
+    LogWriterUtils.getLogWriter()
+        .info("The DS are: " + diskStore1 + "," + diskStore2);

Review comment:
       `LogWriterUtils` and the `getLogWriter()` method are both deprecated. `LogService#getLogger()` should be used instead. This log message also seems redundant, since the same information is already logged as part of the `createSenderWithDiskStore()` method.

##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -1897,6 +1897,106 @@ public void testpersistentWanGateway_restartSender_expectAllEventsReceived_scena
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 3000));
   }
 
+  /**
+   * Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
+   * then stop gateway sender, and stop server. After that create receiver on remote site.
+   * Check if the remote site receives all the events.
+   */
+  @Test
+  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
+    // create locator on local site
+    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
+    // create locator on remote site
+    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
+
+    // create receiver on remote site
+    createCacheInVMs(nyPort, vm2, vm3);
+    // createReceiverInVMs(vm2, vm3);

Review comment:
       This commented out line should be removed.

##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -1897,6 +1897,106 @@ public void testpersistentWanGateway_restartSender_expectAllEventsReceived_scena
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 3000));
   }
 
+  /**
+   * Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
+   * then stop gateway sender, and stop server. After that create receiver on remote site.
+   * Check if the remote site receives all the events.
+   */
+  @Test
+  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
+    // create locator on local site
+    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
+    // create locator on remote site
+    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));

Review comment:
       These casts to `Integer` are redundant and can be removed.

##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -1897,6 +1897,106 @@ public void testpersistentWanGateway_restartSender_expectAllEventsReceived_scena
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 3000));
   }
 
+  /**
+   * Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
+   * then stop gateway sender, and stop server. After that create receiver on remote site.
+   * Check if the remote site receives all the events.
+   */
+  @Test
+  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
+    // create locator on local site
+    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
+    // create locator on remote site
+    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
+
+    // create receiver on remote site
+    createCacheInVMs(nyPort, vm2, vm3);
+    // createReceiverInVMs(vm2, vm3);
+
+    // create cache in local site
+    createCacheInVMs(lnPort, vm4, vm5);
+    vm4.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    // create senders with disk store
+    String diskStore1 = (String) vm4.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+    String diskStore2 = (String) vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+
+    LogWriterUtils.getLogWriter()
+        .info("The DS are: " + diskStore1 + "," + diskStore2);
+
+    // create PR on remote site
+    vm2.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+    vm3.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+
+    // create PR on local site
+    vm4.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+    vm5.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+
+    // start the senders on local site
+    startSenderInVMs("ln", vm4, vm5);
+
+    // wait for senders to become running
+    vm4.invoke(waitForSenderRunnable());
+    vm5.invoke(waitForSenderRunnable());
+
+    // start puts in region on local site
+    vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName(), 10));
+    LogWriterUtils.getLogWriter().info("Completed puts in the region");
+
+    // --------------------close and rebuild local site
+    // -------------------------------------------------
+    // kill the sender in vm5
+    vm5.invoke(killSenderRunnable());
+
+    LogWriterUtils.getLogWriter().info("Killed vm5 sender.");
+
+    // restart the vm
+    createCacheInVMs(lnPort, vm5);
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    LogWriterUtils.getLogWriter().info("Created back the cache");
+
+    // create senders with disk store
+    vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2, true, 100, 10, false, true,
+        null, diskStore2, false));
+
+    LogWriterUtils.getLogWriter().info("Created the senders back from the disk store.");

Review comment:
       See above comment regarding deprecated logging and passing names to the `invoke()` method to avoid needing to log directly during the test.

##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -1897,6 +1897,106 @@ public void testpersistentWanGateway_restartSender_expectAllEventsReceived_scena
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 3000));
   }
 
+  /**
+   * Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
+   * then stop gateway sender, and stop server. After that create receiver on remote site.
+   * Check if the remote site receives all the events.
+   */
+  @Test
+  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
+    // create locator on local site
+    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
+    // create locator on remote site
+    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
+
+    // create receiver on remote site
+    createCacheInVMs(nyPort, vm2, vm3);
+    // createReceiverInVMs(vm2, vm3);
+
+    // create cache in local site
+    createCacheInVMs(lnPort, vm4, vm5);
+    vm4.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    // create senders with disk store
+    String diskStore1 = (String) vm4.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+    String diskStore2 = (String) vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+
+    LogWriterUtils.getLogWriter()
+        .info("The DS are: " + diskStore1 + "," + diskStore2);
+
+    // create PR on remote site
+    vm2.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+    vm3.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+
+    // create PR on local site
+    vm4.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+    vm5.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+
+    // start the senders on local site
+    startSenderInVMs("ln", vm4, vm5);
+
+    // wait for senders to become running
+    vm4.invoke(waitForSenderRunnable());
+    vm5.invoke(waitForSenderRunnable());
+
+    // start puts in region on local site
+    vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName(), 10));
+    LogWriterUtils.getLogWriter().info("Completed puts in the region");
+
+    // --------------------close and rebuild local site
+    // -------------------------------------------------
+    // kill the sender in vm5
+    vm5.invoke(killSenderRunnable());
+
+    LogWriterUtils.getLogWriter().info("Killed vm5 sender.");
+
+    // restart the vm
+    createCacheInVMs(lnPort, vm5);
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    LogWriterUtils.getLogWriter().info("Created back the cache");
+
+    // create senders with disk store
+    vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2, true, 100, 10, false, true,
+        null, diskStore2, false));
+
+    LogWriterUtils.getLogWriter().info("Created the senders back from the disk store.");
+    // create PR on local site
+    vm5.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+
+
+    LogWriterUtils.getLogWriter().info("Created back the partitioned regions");
+
+    LogWriterUtils.getLogWriter().info("Waiting for senders running.");
+    // wait for senders running
+    vm5.invoke(waitForSenderRunnable());
+
+    LogWriterUtils.getLogWriter().info("All the senders are now running...");

Review comment:
       See above comment regarding deprecated logging and passing names to the `invoke()` method to avoid needing to log directly during the test.

##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -1897,6 +1897,106 @@ public void testpersistentWanGateway_restartSender_expectAllEventsReceived_scena
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 3000));
   }
 
+  /**
+   * Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
+   * then stop gateway sender, and stop server. After that create receiver on remote site.
+   * Check if the remote site receives all the events.
+   */
+  @Test
+  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
+    // create locator on local site
+    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
+    // create locator on remote site
+    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
+
+    // create receiver on remote site
+    createCacheInVMs(nyPort, vm2, vm3);
+    // createReceiverInVMs(vm2, vm3);
+
+    // create cache in local site
+    createCacheInVMs(lnPort, vm4, vm5);
+    vm4.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    // create senders with disk store
+    String diskStore1 = (String) vm4.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+    String diskStore2 = (String) vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+
+    LogWriterUtils.getLogWriter()
+        .info("The DS are: " + diskStore1 + "," + diskStore2);
+
+    // create PR on remote site
+    vm2.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+    vm3.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+
+    // create PR on local site
+    vm4.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+    vm5.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+
+    // start the senders on local site
+    startSenderInVMs("ln", vm4, vm5);
+
+    // wait for senders to become running
+    vm4.invoke(waitForSenderRunnable());
+    vm5.invoke(waitForSenderRunnable());
+
+    // start puts in region on local site
+    vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName(), 10));
+    LogWriterUtils.getLogWriter().info("Completed puts in the region");
+
+    // --------------------close and rebuild local site
+    // -------------------------------------------------
+    // kill the sender in vm5
+    vm5.invoke(killSenderRunnable());
+
+    LogWriterUtils.getLogWriter().info("Killed vm5 sender.");
+
+    // restart the vm
+    createCacheInVMs(lnPort, vm5);
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    LogWriterUtils.getLogWriter().info("Created back the cache");

Review comment:
       See above comment regarding deprecated logging and passing names to the `invoke()` method to avoid needing to log directly during the test.

##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -1897,6 +1897,106 @@ public void testpersistentWanGateway_restartSender_expectAllEventsReceived_scena
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 3000));
   }
 
+  /**
+   * Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
+   * then stop gateway sender, and stop server. After that create receiver on remote site.
+   * Check if the remote site receives all the events.
+   */
+  @Test
+  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
+    // create locator on local site
+    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
+    // create locator on remote site
+    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
+
+    // create receiver on remote site
+    createCacheInVMs(nyPort, vm2, vm3);
+    // createReceiverInVMs(vm2, vm3);
+
+    // create cache in local site
+    createCacheInVMs(lnPort, vm4, vm5);
+    vm4.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    // create senders with disk store
+    String diskStore1 = (String) vm4.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+    String diskStore2 = (String) vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+
+    LogWriterUtils.getLogWriter()
+        .info("The DS are: " + diskStore1 + "," + diskStore2);
+
+    // create PR on remote site
+    vm2.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+    vm3.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+
+    // create PR on local site
+    vm4.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+    vm5.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+
+    // start the senders on local site
+    startSenderInVMs("ln", vm4, vm5);
+
+    // wait for senders to become running
+    vm4.invoke(waitForSenderRunnable());
+    vm5.invoke(waitForSenderRunnable());
+
+    // start puts in region on local site
+    vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName(), 10));
+    LogWriterUtils.getLogWriter().info("Completed puts in the region");

Review comment:
       `LogWriterUtils` and the `getLogWriter()` method are both deprecated. `LogService#getLogger()` should be used instead. However, for this log message, and the rest that appear in this test, a better approach would be to pass a name to the `VM.invoke()` method in addition to the lambda, which will result in that name being logged both at the start and end of lambda execution. This prevents the need to add logging throughout the test to know where the test has got to. 
   e.g. 
   `vm4.invoke("Do puts to the region", () -> WANTestBase.doPuts(getTestMethodName(), 10));`
   
   which results in the following logging:
   `[vm4] [info 2020/11/17 15:37:17.164 PST <RMI TCP Connection(1)-10.0.0.221> tid=0x13] Received method: org.apache.geode.test.dunit.internal.IdentifiableRunnable.run with 0 args on object: IdentifiableRunnable(0:Do puts to the region)`
   `...`
   `[vm4]  from org.apache.geode.test.dunit.internal.IdentifiableRunnable.run with 0 args on object: IdentifiableRunnable(0:Do puts to the region) (took 367 ms)`

##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -1897,6 +1897,106 @@ public void testpersistentWanGateway_restartSender_expectAllEventsReceived_scena
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 3000));
   }
 
+  /**
+   * Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
+   * then stop gateway sender, and stop server. After that create receiver on remote site.
+   * Check if the remote site receives all the events.
+   */
+  @Test
+  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
+    // create locator on local site
+    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
+    // create locator on remote site
+    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
+
+    // create receiver on remote site
+    createCacheInVMs(nyPort, vm2, vm3);
+    // createReceiverInVMs(vm2, vm3);
+
+    // create cache in local site
+    createCacheInVMs(lnPort, vm4, vm5);
+    vm4.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    // create senders with disk store
+    String diskStore1 = (String) vm4.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+    String diskStore2 = (String) vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+
+    LogWriterUtils.getLogWriter()
+        .info("The DS are: " + diskStore1 + "," + diskStore2);
+
+    // create PR on remote site
+    vm2.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+    vm3.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        13, isOffHeap()));
+
+    // create PR on local site
+    vm4.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+    vm5.invoke(() -> WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        13, isOffHeap()));
+
+    // start the senders on local site
+    startSenderInVMs("ln", vm4, vm5);
+
+    // wait for senders to become running
+    vm4.invoke(waitForSenderRunnable());
+    vm5.invoke(waitForSenderRunnable());
+
+    // start puts in region on local site
+    vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName(), 10));
+    LogWriterUtils.getLogWriter().info("Completed puts in the region");
+
+    // --------------------close and rebuild local site
+    // -------------------------------------------------
+    // kill the sender in vm5
+    vm5.invoke(killSenderRunnable());
+
+    LogWriterUtils.getLogWriter().info("Killed vm5 sender.");

Review comment:
       See above comment regarding deprecated logging and passing names to the `invoke()` method to avoid needing to log directly during the test.

##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -1897,6 +1897,106 @@ public void testpersistentWanGateway_restartSender_expectAllEventsReceived_scena
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 3000));
   }
 
+  /**
+   * Enable persistence for PR and GatewaySender. Do some puts in local region. Restart 1 server,
+   * then stop gateway sender, and stop server. After that create receiver on remote site.
+   * Check if the remote site receives all the events.
+   */
+  @Test
+  public void testPersistentPRWithGatewaySenderPersistenceEnabled_RestartAndStopServer() {
+    // create locator on local site
+    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
+    // create locator on remote site
+    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));
+
+    // create receiver on remote site
+    createCacheInVMs(nyPort, vm2, vm3);
+    // createReceiverInVMs(vm2, vm3);
+
+    // create cache in local site
+    createCacheInVMs(lnPort, vm4, vm5);
+    vm4.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(2));
+
+    // create senders with disk store
+    String diskStore1 = (String) vm4.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,
+        true, 100, 10, false, true, null, null, true));
+    String diskStore2 = (String) vm5.invoke(() -> WANTestBase.createSenderWithDiskStore("ln", 2,

Review comment:
       These casts to `String` are redundant and can be removed.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac merged pull request #5752: GEODE-8714: return event to queue at stoping of gw sender

Posted by GitBox <gi...@apache.org>.
mivanac merged pull request #5752:
URL: https://github.com/apache/geode/pull/5752


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] kohlmu-pivotal commented on pull request #5752: GEODE-8714: return event to queue at stoping of gw sender

Posted by GitBox <gi...@apache.org>.
kohlmu-pivotal commented on pull request #5752:
URL: https://github.com/apache/geode/pull/5752#issuecomment-729291391


   @mivanac could you please address these comments. These things really should have been caught before the merge happened.
    


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] kohlmu-pivotal commented on pull request #5752: GEODE-8714: return event to queue at stoping of gw sender

Posted by GitBox <gi...@apache.org>.
kohlmu-pivotal commented on pull request #5752:
URL: https://github.com/apache/geode/pull/5752#issuecomment-729886341


   @mivanac Thank you for trying to make the new look like the "old"... I do follow a the simple guide of the "Boy Scouts".... "Leave the place in a better state that you found it."
   If I were you, there would be a great chance that I would clean up the test cases in question. That way at least I know that there is less to clean up.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac edited a comment on pull request #5752: GEODE-8714: return event to queue at stoping of gw sender

Posted by GitBox <gi...@apache.org>.
mivanac edited a comment on pull request #5752:
URL: https://github.com/apache/geode/pull/5752#issuecomment-729505801


   Hi, I will update test.
   But you can see that this is modification of existing test cases. Just look at any test case in this class.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac commented on pull request #5752: GEODE-8714: return event to queue at stoping of gw sender

Posted by GitBox <gi...@apache.org>.
mivanac commented on pull request #5752:
URL: https://github.com/apache/geode/pull/5752#issuecomment-729505801


   Hi, I will update test.
   But you can see that this is modification of existing test cases.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac commented on pull request #5752: GEODE-8714: return event to queue at stoping of gw sender

Posted by GitBox <gi...@apache.org>.
mivanac commented on pull request #5752:
URL: https://github.com/apache/geode/pull/5752#issuecomment-729507409


   If you see problems, with all this things that you commented,
   could you then consider, refactoring of all the existing test cases.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org