Skip to content

Fix data race when a buffer queue is being reset instead of being initialized #4718

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

emasab
Copy link
Contributor

@emasab emasab commented May 15, 2024

A data race happened when emptying buffers of a failing broker, in its thread, with the statistics callback in main thread gathering the buffer counts. Solved by resetting the atomic counters instead of initializing them. Happening since 1.x

Closes #4522

@emasab emasab force-pushed the dev_fix_data_race_rkbufq_atomic branch from b14d341 to f979784 Compare May 15, 2024 10:36
Copy link
Contributor

@milindl milindl left a comment

Choose a reason for hiding this comment

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

Looks good to me - please update the changelog for version

@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

instead of being initialized

A data race happened when emptying buffers of a failing broker, in its thread,
with the statistics callback in main thread gathering the buffer counts.
Solved by resetting the atomic counters instead of initializing them.
Happening since 1.x

Closes #4522
@airlock-confluentinc airlock-confluentinc bot force-pushed the dev_fix_data_race_rkbufq_atomic branch from f979784 to 4ae28e7 Compare June 19, 2025 09:02
@airlock-confluentinc airlock-confluentinc bot requested a review from a team as a code owner June 19, 2025 09:02
@emasab emasab merged commit 519d44b into master Jun 19, 2025
2 checks passed
@emasab emasab deleted the dev_fix_data_race_rkbufq_atomic branch June 19, 2025 10:01
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.

Data race in rd_kafka_stats_emit_all
2 participants