[ 
https://issues.apache.org/jira/browse/GEODE-8579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17211024#comment-17211024
 ] 

ASF GitHub Bot commented on GEODE-8579:
---------------------------------------

Bill commented on a change in pull request #5598:
URL: https://github.com/apache/geode/pull/5598#discussion_r502058030



##########
File path: 
geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/MembershipIntegrationTest.java
##########
@@ -272,6 +276,65 @@ public void secondMembershipPausesForLocatorWaitTime()
     stop(coordinatorLocator, lateJoiningLocator);
   }
 
+  @Test
+  public void locatorsStopWaitingForLocatorWaitTimeIfAllLocatorsContacted()
+      throws IOException, MemberStartupException, InterruptedException, 
TimeoutException,
+      ExecutionException {
+
+    final Supplier<ExecutorService> executorServiceSupplier =
+        () -> LoggingExecutors.newCachedThreadPool("membership", false);
+
+    int[] locatorPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+
+    int locatorWaitTime = (int) Duration.ofMinutes(5).getSeconds();
+    final MembershipConfig config =
+        createMembershipConfig(true, locatorWaitTime, locatorPorts[0], 
locatorPorts[1]);
+
+    CompletableFuture<Membership<MemberIdentifier>> createMembership0 =
+        launchLocator(executorServiceSupplier, locatorPorts[0], config);
+
+    // Assert that membership 0 is waiting for the other locator to start
+    Thread.sleep(5000);
+    assertThat(createMembership0.getNow(null)).isNull();
+
+    CompletableFuture<Membership<MemberIdentifier>> createMembership1 =
+        launchLocator(executorServiceSupplier, locatorPorts[1], config);
+
+    // Make sure the members are created in less than the locator-wait-time
+    Membership<MemberIdentifier> membership0 = createMembership0.get(2, 
TimeUnit.MINUTES);
+    Membership<MemberIdentifier> membership1 = createMembership1.get(2, 
TimeUnit.MINUTES);
+
+    // Make sure the members see each other in the view
+    assertThat(membership0.getView().getMembers()).hasSize(2);
+    assertThat(membership1.getView().getMembers()).hasSize(2);
+  }

Review comment:
       Here's that new ticket: https://issues.apache.org/jira/browse/GEODE-8589




----------------------------------------------------------------
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:
us...@infra.apache.org


> Locators should stop waiting for locator-wait-time if all locators contacted
> ----------------------------------------------------------------------------
>
>                 Key: GEODE-8579
>                 URL: https://issues.apache.org/jira/browse/GEODE-8579
>             Project: Geode
>          Issue Type: Improvement
>          Components: membership
>            Reporter: Dan Smith
>            Assignee: Dan Smith
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.14.0
>
>
> If locator-wait-time is set on one or more locators, the locators can 
> currently end up waiting for the entire locator-wait-time before starting up, 
> even if all locators can contact each other.
> If the locators can all contact each other, they should start up right away 
> and not wait any longer, even if locator-wait-time is set.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to