Skip to content

fix(disk-buffer): Cache length when closing buffer to avoid panic with --once#19050

Open
srebhan wants to merge 1 commit into
influxdata:masterfrom
srebhan:disk_buffer
Open

fix(disk-buffer): Cache length when closing buffer to avoid panic with --once#19050
srebhan wants to merge 1 commit into
influxdata:masterfrom
srebhan:disk_buffer

Conversation

@srebhan

@srebhan srebhan commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

The --once code-path tries to get the number metrics remaining in the buffer after it was closed. This leads to a panic as you cannot determine the buffer-length on a closed WAL file.

Therefore, this PR caches the buffer length before closing the buffer to avoid accessing the closed WAL file and in turn to avoid the panic.

Checklist

Related issues

resolves #19248

@telegraf-tiger telegraf-tiger Bot added the chore label Jun 8, 2026
@srebhan srebhan marked this pull request as draft June 8, 2026 14:48
@srebhan srebhan changed the title chore(agent): Mark disk-buffer strategy as stable fix(disk-buffer): Cache length when closing buffer to avoid panic with --once Jul 15, 2026
@telegraf-tiger telegraf-tiger Bot added the fix pr to fix corresponding bug label Jul 15, 2026
@srebhan srebhan marked this pull request as ready for review July 15, 2026 13:23
@srebhan srebhan added area/agent plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins and removed chore labels Jul 15, 2026
@telegraf-tiger

Copy link
Copy Markdown
Contributor

@srebhan srebhan 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 Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out 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.

disk buffer panic on shutdown

2 participants