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 a potential issue with race condition when reloading a config #122

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

alexole
Copy link
Contributor

@alexole alexole commented Apr 10, 2024

When SIGHUP is sent during load_config it's possible that config_reload_pending will be set to False (thus overwriting the True value, which was set in signal handler) and new reload won't happen.

pglookout/pglookout.py Outdated Show resolved Hide resolved
When SIGHUP is sent during `load_config` it's possible that `config_reload_pending`
will be set to `False` (thus overwriting the `True` value, which was set in signal handler)
and new reload won't happen.
@alexole alexole force-pushed the alex-fix-race-condition-while-config-reload branch from 5a7066e to 704841d Compare April 10, 2024 12:55
@codecov-commenter
Copy link

codecov-commenter commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 68.64%. Comparing base (7c5e53c) to head (704841d).

Files Patch % Lines
pglookout/pglookout.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #122      +/-   ##
==========================================
- Coverage   68.91%   68.64%   -0.28%     
==========================================
  Files          10       10              
  Lines        1007     1011       +4     
  Branches      176      175       -1     
==========================================
  Hits          694      694              
- Misses        257      261       +4     
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexole alexole marked this pull request as ready for review April 10, 2024 13:28
@rdunklau rdunklau merged commit 5700ff3 into main Apr 10, 2024
21 checks passed
@rdunklau rdunklau deleted the alex-fix-race-condition-while-config-reload branch April 10, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants