Skip to content

Spark 4.0: Disable executor cache for delete files in RewriteDataFilesSparkAction - #13820

Merged
RussellSpitzer merged 2 commits into
apache:mainfrom
anuragmantri:disable-executor-cache-rewrites
Aug 15, 2025
Merged

RussellSpitzer merged 2 commits into
apache:mainfrom
anuragmantri:disable-executor-cache-rewrites

Conversation

@anuragmantri

@anuragmantri anuragmantri commented Aug 14, 2025 •

Copy link
Copy Markdown
Collaborator

Fixes: #11648

Disables executor cache for delete files in RewriteDataFilesSparkAction.

@github-actions github-actions Bot added the spark label Aug 14, 2025
spark().conf().set(SQLConf.ADAPTIVE_EXECUTION_ENABLED().key(), false);
// Disable executor cache for delete files as each partition is rewritten separately,
// so caching delete files across partitions provides no benefit for rewrites
spark().conf().set(SparkSQLProperties.EXECUTOR_CACHE_DELETE_FILES_ENABLED, "false");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is one case when we wouldn't want to do this I think, which is if we are compacting to a target spec from non-target specs. When we do that we do actually group data from multiple partitions together. It's probably fine to just leave this as false though for now and if we get any future feedback we can address it then.

@RussellSpitzer
RussellSpitzer merged commit 24447bf into apache:main Aug 15, 2025
@RussellSpitzer

Copy link
Copy Markdown
Member

Thanks @anuragmantri , merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SparkExecutorCache causes slowness of RewriteDataFilesSparkAction

2 participants