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

Fix race conditions in logging package functions and enable race detection in tests #1101

Merged
merged 1 commit into from
Aug 11, 2023

Commits on Aug 10, 2023

  1. Fix race conditions in logging package functions

    The logging package contains two functions, SetLogOptions and SetLogFile, that could experience race conditions when multiple goroutines access and modify the logger struct concurrently. 
    To address these issues, a copy of the logger struct is now created in each function to eliminate data races.
    
    In addition, the test-go.sh script is updated to include the '-race' flag, enabling race detection during testing. This change helps prevent future race conditions by activating the Go race detector.
    
    Signed-off-by: Alina Sudakov <[email protected]>
    AlinaSecret committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    272b3ca View commit details
    Browse the repository at this point in the history