Skip to content

feat(scheduler): add a setting to disable the shared file statistics cache - #2510

Merged
andygrove merged 1 commit into
apache:mainfrom
andygrove:footer-stats-config-pr
Sep 30, 2026
Merged

andygrove merged 1 commit into
apache:mainfrom
andygrove:footer-stats-config-pr

Conversation

@andygrove

Copy link
Copy Markdown
Member

Which issue does this PR close?

No issue. This is the config follow-up to #2498 promised in review.

Rationale for this change

#2498 made the scheduler share one file statistics cache across sessions, so planning no longer reads every Parquet footer again for every job. A cached entry is only reused while the file's size and modification time match the job's own listing, and that check misses a file rewritten in place without changing either (apache/datafusion#25841 tracks comparing e-tags and versions). @milenkovicm asked for a ballista. setting to turn sharing off should corner cases like that turn up.

What changes are included in this PR?

  • A new setting, ballista.scheduler.share_file_statistics_cache, true by default, and a BallistaConfig::share_file_statistics_cache() getter.
  • share_file_statistics_cache reads the setting from the config each session is built with. A session with it set to false is returned as the session builder built it, which with the default builder means a statistics cache of its own, as before perf(scheduler): share the file statistics cache across sessions #2498. It never becomes the shared cache, so sessions left at the default keep sharing.
  • The doc comments on share_file_statistics_cache and BallistaCluster::new_memory and the generated config reference describe the setting.

A new test goes through BallistaCluster::new_memory and builds a session with the setting off, then two with the default. The two default sessions share a cache and the opted-out one keeps its own. Without the change it fails, because the opted-out session is built first and its cache becomes the shared one.

Are there any user-facing changes?

There is a new setting. Running SET ballista.scheduler.share_file_statistics_cache = false, or setting it on the client's SessionConfig, keeps that session's jobs off the shared cache. It applies per session. Clients send every ballista.* setting with each job, so the client's value wins over any default set on the scheduler side, and there is no scheduler-wide switch.

The default keeps the current behavior, and no existing API changes.

…cache

apache#2498 made the scheduler share one file statistics cache across
sessions. Add ballista.scheduler.share_file_statistics_cache, true by
default, so a session can keep its jobs off the shared cache if shared
statistics turn out stale in a case the size and modification time
check misses.

A session with the setting off is returned as its session builder built
it and never becomes the shared cache, so sessions left at the default
keep sharing.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 29, 2026

@milenkovicm milenkovicm 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.

LGTM thanks @andygrove

@andygrove
andygrove merged commit ba1ab3b into apache:main Sep 30, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants