FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Track and account memory allocation size in replication queries by stelfrag · Pull Request #22756 · netdata/netdata · GitHub

Track and account memory allocation size in replication queries - #22756

Merged
stelfrag merged 1 commit into
netdata:masterfrom
stelfrag:fix_mem_accounting
Jun 18, 2026
Merged

Track and account memory allocation size in replication queries#22756
stelfrag merged 1 commit into
netdata:masterfrom
stelfrag:fix_mem_accounting

Conversation

stelfrag commented Jun 18, 2026
edited by cubic-dev-ai Bot
Loading

Copy link
Copy Markdown
Collaborator
Summary
  • Added alloc_size field to struct replication_query to store allocation size.
  • Modified replication_buffers_allocated updates to use alloc_size for both increments and decrements.
  • Introduced an additional buffer deallocation safeguard during request cancellation.

Summary by cubic

Make memory accounting for replication queries exact by tracking per-query allocation size and correcting counter updates on free and cancellation. Prevents drift in replication_buffers_allocated.

  • Bug Fixes
    • Store alloc_size in struct replication_query and use it for counter increments/decrements.
    • During pipeline cancellation, subtract request buffer bytes before freeing rtp.rqs.

Written for commit 75fffd1. Summary will update on new commits.

- Added `alloc_size` field to `struct replication_query` to store allocation size.
- Modified `replication_buffers_allocated` updates to use `alloc_size` for both increments and decrements.
- Introduced an additional buffer deallocation safeguard during request cancellation.

cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Copy link
Copy Markdown

stelfrag marked this pull request as ready for review June 18, 2026 07:10
stelfrag requested a review from thiagoftsm as a code owner June 18, 2026 07:10

thiagoftsm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Streaming is working as expected. LGTM!

stelfrag merged commit 996c66c into netdata:master Jun 18, 2026
157 checks passed
stelfrag deleted the fix_mem_accounting branch June 18, 2026 13:06
stelfrag mentioned this pull request Jun 22, 2026
Ferroin pushed a commit that referenced this pull request Jul 15, 2026
- Added `alloc_size` field to `struct replication_query` to store allocation size.
- Modified `replication_buffers_allocated` updates to use `alloc_size` for both increments and decrements.
- Introduced an additional buffer deallocation safeguard during request cancellation.

(cherry picked from commit 996c66c)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL