Skip to content

tests: fix datafusion_memory_mb wiring and parameterize on workers/hosts - #6754

Merged
blp merged 2 commits into
mainfrom
datafusion-ci-sizing
Jul 29, 2026
Merged

tests: fix datafusion_memory_mb wiring and parameterize on workers/hosts#6754
blp merged 2 commits into
mainfrom
datafusion-ci-sizing

Conversation

@blp

@blp blp commented Jul 29, 2026

Copy link
Copy Markdown
Member

test_udp.py runs with FELDERA_TEST_NUM_WORKERS=8 by default and sets datafusion_memory_mb to 512. The adhoc query engines pre-reserves SORT_SPILL_RESERVATION_BYTES (64 MiB = 67,108,864 bytes) per partition, which already exceeds the 512 MB pool. This caused CI runs to fail. This was introduced in commit 2ee3bf1 ("[manager] Set the memory limits from the local OS/container when they are not specified"), which added datafusion_memory_mb=512 to the test without accounting for the 8-worker reservation math.

This commit fixes the problem by parameterizing the memory for datafusion on the number of workers. It also fixes a bug in the Python API, which didn't provide the datafusion_memory_mb RuntimeConfig field, instead trying to set it via the resources field, which doesn't work.

test_udp.py runs with FELDERA_TEST_NUM_WORKERS=8 by default and sets
datafusion_memory_mb to 512. The adhoc query engines pre-reserves
SORT_SPILL_RESERVATION_BYTES (64 MiB = 67,108,864 bytes) per partition,
which already exceeds the 512 MB pool.  This caused CI runs to fail.
This was introduced in commit 2ee3bf1 ("[manager] Set the memory
limits from the local OS/container when they are not specified"), which
added datafusion_memory_mb=512 to the test without accounting for the
8-worker reservation math.

This commit fixes the problem by parameterizing the memory for
datafusion on the number of workers.  It also fixes a bug in the Python
API, which didn't provide the datafusion_memory_mb RuntimeConfig field,
instead trying to set it via the resources field, which doesn't work.

Signed-off-by: Ben Pfaff <blp@feldera.com>
@blp
blp requested review from mihaibudiu and swanandx July 29, 2026 18:51
@blp blp self-assigned this Jul 29, 2026
@blp blp added bug Something isn't working CI/CD adhoc Issue related to ad hoc query processing python Pull requests that update python code labels Jul 29, 2026
@blp
blp enabled auto-merge July 29, 2026 18:55
@blp
blp added this pull request to the merge queue Jul 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 29, 2026
@blp

blp commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

CI failed because the other fix that I have submitted isn't in, so I just cherry-picked that one onto this branch so that they merge together. shrug

@blp
blp enabled auto-merge July 29, 2026 19:37
@blp
blp added this pull request to the merge queue Jul 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 29, 2026
Commit 92b29a4 ("[dbsp] Avoid repeatedly listing files in storage with
no checkpoints.") changed Checkpointer::read_checkpoints() to write an
empty checkpoint file if it found that one did not exist.  A failing
CI run demonstrated that this in fact introduced a race against
checkpoint synchronization.

This commit fixes the problem by using a different approach: instead of
writing a checkpoint catalog file, we only do the full scan of the
directory once at startup instead of every time we try to read the catalog.
This still accomplishes the original goal of avoiding doing a full
directory scan every time.

Fixes: #6750

Signed-off-by: Ben Pfaff <blp@feldera.com>
@blp
blp force-pushed the datafusion-ci-sizing branch from 7f1350c to ef7b488 Compare July 29, 2026 20:39
@blp
blp enabled auto-merge July 29, 2026 20:39
@blp
blp added this pull request to the merge queue Jul 29, 2026
Comment thread crates/dbsp/src/circuit/checkpointer.rs
Merged via the queue into main with commit a58d26c Jul 29, 2026
1 check passed
@blp
blp deleted the datafusion-ci-sizing branch July 29, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Issue related to ad hoc query processing bug Something isn't working CI/CD python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants