Skip to content

fix(coderd/batchstats): fix init race and close flush #9248

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 5 commits into from
Aug 23, 2023

Conversation

mafredri
Copy link
Member

Ran into two issues when working with the statsbatcher, a small race in init where the buffer may not yet be allocated when calling Add and flush using a cancelled context on close.

  • fix race in batchstats batcher init
  • fix flush after close in statsbatcher

@mafredri mafredri self-assigned this Aug 22, 2023
@mafredri mafredri requested a review from johnstcn August 22, 2023 14:50
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

Nice find!

@mafredri mafredri changed the title fix(coderd/batchststs): fix init race and close flush fix(coderd/batchstats): fix init race and close flush Aug 22, 2023
@mafredri mafredri merged commit ed2b123 into main Aug 23, 2023
@mafredri mafredri deleted the mafredri/fix-statsbatcher branch August 23, 2023 08:58
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants