Skip to content

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