Skip to content

test: migrate memory accounting fuzzing to FuzzTest - #27604

Open
2010YOUY01 wants to merge 1 commit into
mainfrom
2010YOUY01/fuzz-stack-memory
Open

2010YOUY01 wants to merge 1 commit into
mainfrom
2010YOUY01/fuzz-stack-memory

Conversation

@2010YOUY01

@2010YOUY01 2010YOUY01 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR close?

Part of #27082.

The stacked PRs are independent, it's only intended to avoid merge conflicts.

Rationale for this change

Refactor memory accounting fuzzing to FuzzTest trait

What changes are included in this PR?

Replace the standalone unit test with RecordBatchMemoryFuzzer. Each case performs 300 random count/uncount operations and compares the incremental tracker with a fresh recount after every operation.

Reading order:

  1. datafusion/fuzz/tests/suites/memory.rs::RecordBatchMemoryFuzzer: shared-buffer fixtures and accounting invariant.
  2. datafusion/fuzz/tests/fuzz.rs::record_batch_memory_tracker: one-second campaign.
  3. datafusion/common/src/utils/memory.rs: removal of the migrated test.

What is the testing strategy for this PR?

Local run result:

Fuzz suite record_batch_memory_tracker: 2535 cases, 26 datasets, 1.000325083s

Are there any user-facing changes?

No.

@2010YOUY01
2010YOUY01 added this pull request to stack #27607 November 20, 2026 10:00
@2010YOUY01
2010YOUY01 marked this pull request as ready for review November 20, 2026 10:09
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.38%. Comparing base (a56c519) to head (f346ef1).

Flag Coverage Δ
all-tests 83.38% <ø> (-0.01%) ⬇️
sqllogictests 60.34% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@            Coverage Diff             @@
##             main   #27604      +/-   ##
==========================================
- Coverage   83.38%   83.38%   -0.01%     
==========================================
  Files        1057     1057              
  Lines      471264   471216      -48     
  Branches   471264   471216      -48     
==========================================
- Hits       392981   392927      -54     
- Misses      54026    54030       +4     
- Partials    24257    24259       +2     
Files with missing lines Coverage Δ
datafusion/common/src/utils/memory.rs 95.17% <ø> (-0.23%) ⬇️

... and 5 files with indirect coverage changes

🚀 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.

@github-actions github-actions Bot added the common Related to common crate label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants