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

Do not re-schedule backup event timer if connection is closing and client is shutting down #916

Merged
merged 1 commit into from
Aug 22, 2021

Conversation

ihsandemir
Copy link
Collaborator

Added an extra check for re-scheduled backup event timer so that it is not being re-scheduled when the client being shutdown. Failing to do so causes the shutdown to hang up. Possible scenario for generating the problem:

  1. Trigger client shutdown.
  2. The backup timer expired and its lambda code is being executed.
  3. The connection close cancels the timer but it is not effective since the time is not in the wait queue.
  4. The timer is being rescheduled.

Also, checked all the other timers, they all have similar checks. Changed the location of the check for the ClientConnectionManagerImpl::schedule_connect_to_all_members method.

fixes #900

Please see reproducer test at reproducer branch.

…s not being re-scheduled when the client being shutdown. Failing to do so causes the shutdown to hang up. Possible scenario for generating the problem:

1. Trigger client shutdown.
2. The backup timer expired and its lambda code is being executed.
3. The connection close cancels the timer but it is not effective since the time is not in the wait queue.
4. The timer is being rescheduled.

Also, checked all the other timers, they all have similar checks. Changed the location of the check for the `ClientConnectionManagerImpl::schedule_connect_to_all_members` method.

fixes hazelcast#900
@ihsandemir ihsandemir added this to the 4.2 milestone Aug 20, 2021
@ihsandemir ihsandemir requested review from yuce and yemreinci August 20, 2021 15:16
@ihsandemir ihsandemir self-assigned this Aug 20, 2021
@ihsandemir
Copy link
Collaborator Author

verify

@devOpsHazelcast
Copy link
Contributor

Windows test PASSed.

@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

@ihsandemir ihsandemir merged commit 978d7e3 into hazelcast:master Aug 22, 2021
@ihsandemir ihsandemir deleted the issu_900_fix branch August 22, 2021 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lockup in library when client shuts down
3 participants