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

Add spinlock to protect metric release #16989

Merged
merged 2 commits into from Feb 12, 2024

Conversation

stelfrag
Copy link
Collaborator

@stelfrag stelfrag commented Feb 11, 2024

Summary
  • Protect metric release with a spinlock
    During shutdown, finalizing all metrics can result in a race condition if a dimension directory delete callback is called at the same time.
  • Cleanup service thread. Remove duplicate code by calling rrddim_finalize_collection_and_check_retention

During shutdown service thread should exit faster
Copy link
Contributor

@thiagoftsm thiagoftsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is working as expected, LGTM!

@stelfrag stelfrag merged commit 140d437 into netdata:master Feb 12, 2024
130 checks passed
@stelfrag stelfrag deleted the protect_metric_finalize branch February 12, 2024 15:00
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

2 participants