Skip to content

fix: drain closed accumulator window on re-opened key#3494

Merged
vigith merged 2 commits into
mainfrom
fix-accum-delete-window-reopen
Jul 10, 2026
Merged

fix: drain closed accumulator window on re-opened key#3494
vigith merged 2 commits into
mainfrom
fix-accum-delete-window-reopen

Conversation

@vaibhavtiwari33

@vaibhavtiwari33 vaibhavtiwari33 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Related issues

Related to #3262

Testing

Long running pipeline with accumulator not returning any messages was allowed to run with a jitter source containing repeated keys. The increase in memory for the accumulator reduced significantly in that scenario

Special notes for reviewers

There still seems to be a memory leak somewhere leading to a slow creeping increase in memory usage, only visible during long runs. Hence, the original issue referenced will be left open.

Screenshot 2026-07-09 at 10 13 36 AM

Signed-off-by: Vaibhav Tiwari <vaibhav.tiwari33@gmail.com>
@vaibhavtiwari33 vaibhavtiwari33 changed the title fix(reduce): drain closed accumulator window on re-opened key fix: drain closed accumulator window on re-opened key Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.95918% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.07%. Comparing base (6e64ec1) to head (ba8fbc6).

Files with missing lines Patch % Lines
...c/reduce/reducer/unaligned/windower/accumulator.rs 97.95% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3494      +/-   ##
==========================================
+ Coverage   83.02%   83.07%   +0.05%     
==========================================
  Files         310      310              
  Lines       81426    81426              
==========================================
+ Hits        67605    67646      +41     
+ Misses      13228    13187      -41     
  Partials      593      593              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tmenjo

tmenjo commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thank you for a new fix. I've run my pipeline on the Numaflow with this fix.

Screenshots

Memory usage

(Timestamps are in UTC.)

The memory usage of the numa container (yellow line) still went up gradually. However, compared to the chart I had reported in #3461 (comment), its increasing rate looked to get smaller. 16-24 MiB per day by eye. I possibly have a workaround in this rate, such as restarting the Pod for my accumulator every few hundred days to reset the memory usage.

image

Storage usage

(Timestamps are in +0900.)

There was no problem. It went up and down, but did not increase monotonically.

image-20260709-052312

Logs

(Timestamps are in +0900).

Environment

  • Numaflow: cbc275a
    • Note that actual commit ID is 78c66f3455afbe6e0508685e01d53bddaf2cf3df because I locally modified and commited image URLs in the spec files to use my own built one. Please be careful when you view debug logs.
  • pynumaflow: 0.14.0

@vaibhavtiwari33

vaibhavtiwari33 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @tmenjo for trying out this partial fix. I'll open this PR up for review. Meanwhile I'm still investigating the minor leak that even I've observed during my testing, which is now corroborated by you as well.

@vaibhavtiwari33 vaibhavtiwari33 marked this pull request as ready for review July 9, 2026 14:10
@vigith

vigith commented Jul 9, 2026

Copy link
Copy Markdown
Member

@vaibhavtiwari33 can you run bytehound and figure out what is happening?

@vigith vigith merged commit cc96f31 into main Jul 10, 2026
27 checks passed
@vigith vigith deleted the fix-accum-delete-window-reopen branch July 10, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants