[
https://issues.apache.org/jira/browse/GEODE-8241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17136161#comment-17136161
]
ASF GitHub Bot commented on GEODE-8241:
---------------------------------------
aaronlindsey commented on pull request #5236:
URL: https://github.com/apache/geode/pull/5236#issuecomment-644401196
> Once those are answered, I feel like we are still left with a test that
will be flaky because of all the timing dependencies here.
I understand your concern. We tried to choose the 2x and 3x values so that
there is a sufficient buffer between (a) the minimum wait time, (b) the time at
which the coordinator membership becomes "reachable", and (c) the locator wait
time. We saw that with these values the test did pass and fail reliably. We
also tried writing a test using `GMSJoinLeaveJUnitTest` but it had the same
type of timing dependencies.
The difficulty here is that we're trying to write "black box" style tests
for a timeout. I don't see a way to avoid the timing dependencies without a
large refactor, which I was trying to avoid since this is otherwise a small
change with very little risk.
----------------------------------------------------------------
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:
[email protected]
> Locator does not observe locator-wait-time
> ------------------------------------------
>
> Key: GEODE-8241
> URL: https://issues.apache.org/jira/browse/GEODE-8241
> Project: Geode
> Issue Type: Bug
> Reporter: Aaron Lindsey
> Assignee: Aaron Lindsey
> Priority: Major
>
> In the case where a locator starts up and is unable to connect to any other
> locators, it may decide to become the membership coordinator even if
> locator-wait-time has not elapsed.
> The following conditional from GMSJoinLeave.java causes the issue. There
> should be an additional check for locator-wait-time before becoming
> coordinator.
> {code:java}
> if (state.joinedMembersContacted <= 0 &&
> (tries >= minimumRetriesBeforeBecomingCoordinator ||
> state.locatorsContacted >= locators.size())) {
> synchronized (viewInstallationLock) {
> becomeCoordinator();
> }
> return true;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)