Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEODE-8951: Unnecessary messaging in WAN locator discovery #6496

Merged
merged 1 commit into from May 26, 2021

Conversation

alb3rtobr
Copy link
Contributor

The ticket states that when a locator joins the cluster, it is notified about itself joining the system.
That problem was already solved by GEODE-6977, in locatorJoined(...) method of LocatorMembershipListenerImpl class, before starting the thread that will send the notifications about the new locator:

    // Remove locators that don't need to be notified (myself, the joining one and the one that
    // notified myself).
    List<DistributionLocatorId> ignoreList = Arrays.asList(locator, localLocatorId, sourceLocator);
    for (Map.Entry<Integer, Set<DistributionLocatorId>> entry : localCopy.entrySet()) {
      for (DistributionLocatorId removeLocId : ignoreList) {
        entry.getValue().remove(removeLocId);
      }
    }

Anyway, in order to verify that no more than the expected number of notification messages are sent, a check can be added to three unit tests of LocatorMembershipListenerImpl class. These test cases verify that the proper messages are sent, but they would not fail if unexpected messages were sent.

@alb3rtobr alb3rtobr marked this pull request as ready for review May 19, 2021 06:43
@alb3rtobr
Copy link
Contributor Author

Kind reminder, review by code owners still pending

@alb3rtobr
Copy link
Contributor Author

thanks @boglesby !

@alb3rtobr alb3rtobr merged commit c857586 into apache:develop May 26, 2021
@alb3rtobr alb3rtobr deleted the feature/GEODE-8951 branch May 26, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants