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(parsers.avro): Add mutex to cache access #15921

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

athornton
Copy link
Contributor

Summary

If you have a large number of topics, you will eventually get in a place where telegraf crashes on startup by trying to read and write the schema map at the same time.

This fixes that issue by protecting read and write access to the schema map with a mutex.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15920

@athornton athornton changed the title Add mutex to avro parser cache access fix: Add mutex to avro parser cache access Sep 20, 2024
@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Sep 20, 2024
Copy link
Member

@DStrand1 DStrand1 left a comment

Choose a reason for hiding this comment

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

Thanks for the quick PR!

@DStrand1 DStrand1 changed the title fix: Add mutex to avro parser cache access fix(parsers.avro): Add mutex to cache access Sep 23, 2024
@telegraf-tiger telegraf-tiger bot added the plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins label Sep 23, 2024
@DStrand1 DStrand1 added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Sep 23, 2024
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks @athornton!

@srebhan srebhan merged commit 66245c4 into influxdata:master Sep 30, 2024
29 checks passed
@github-actions github-actions bot added this to the v1.32.1 milestone Sep 30, 2024
jiangxianfu pushed a commit to jiangxianfu/telegraf that referenced this pull request Sep 30, 2024
srebhan pushed a commit that referenced this pull request Oct 7, 2024
asaharn pushed a commit to asaharn/telegraf that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avro schema registry concurrency issue with many topics
3 participants