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

[BACKPORT] Make sure that the logger static lock mutex is not destroyed before any global client instance #992

Merged

Conversation

ihsandemir
Copy link
Collaborator

Make sure that the logger static lock mutex is not destroyed before any global client instance (#977)

Changed the logger lock mutex so that we can control its destruction order properly. We do not want it destroyed before the client is destructed. We need to control the order. static initialization and destruction order is not controllable if it is not a member of the logger class. It can be destroyed before the any global client instance is destroyed since global variables are also in static duration (https://www.learncpp.com/cpp-tutorial/introduction-to-global-variables).

backports #977

…ny global client instance (hazelcast#977)

* Changed the logger lock mutex so that we can control its destruction order properly. We do not want it destroyed before the client is destructed. We need to control the order. static initialization and destruction order is not controllable if it is not a member of the logger class. It can be destroyed before the any global client istance is destroyed since global variables are also in static duration (https://www.learncpp.com/cpp-tutorial/introduction-to-global-variables).
@ihsandemir ihsandemir added this to the 4.2.1 milestone Jun 20, 2022
@ihsandemir ihsandemir requested review from yuce and srknzl June 20, 2022 12:29
@ihsandemir ihsandemir self-assigned this Jun 20, 2022
@devOpsHazelcast
Copy link
Contributor

Linux test PASSed.

@devOpsHazelcast
Copy link
Contributor

Windows test PASSed.

@ihsandemir ihsandemir merged commit 61c2f92 into hazelcast:4.2.z Jun 20, 2022
@ihsandemir ihsandemir deleted the 4_2_z/logger_mutex_lifecycle_fix branch June 20, 2022 14:29
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.

None yet

4 participants