Skip to content

Fix potential metric loss when open_buffer is combined with disable_buffering=False#820

Merged
vickenty merged 2 commits intomasterfrom
vickenty/ctx
Mar 18, 2024
Merged

Fix potential metric loss when open_buffer is combined with disable_buffering=False#820
vickenty merged 2 commits intomasterfrom
vickenty/ctx

Conversation

@vickenty
Copy link
Copy Markdown
Contributor

What does this PR do?

Fix potential metric loss when open_buffer is combined with disable_buffering=False.

Description of the Change

Remove call to _reset_buffer from open_buffer.

When disable_buffering=False, the buffer may contain still unsent metrics, which are lost when we reset the buffer.

Alternate Designs

Possible Drawbacks

Verification Process

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

When disable_buffering=False, the buffer may contain still unsent
metrics, which are lost when we reset the buffer. When
disable_buffering=True, the reset is a noop anyway.
Even if disable_buffering defaults to False, the user may still opt to
disable it, in which case the code in these methods still must execute
as it is today.
@vickenty vickenty added the changelog/Fixed Fixed features results into a bug fix version bump label Mar 15, 2024
@vickenty vickenty marked this pull request as ready for review March 15, 2024 21:41
@vickenty vickenty requested a review from a team as a code owner March 15, 2024 21:41
@vickenty vickenty requested a review from a team March 15, 2024 21:41
@vickenty vickenty merged commit 7e97780 into master Mar 18, 2024
@vickenty vickenty deleted the vickenty/ctx branch March 18, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Fixed Fixed features results into a bug fix version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants