apache / apache/beam

Less wasteful ArtifactStagingService

Open
#19,076 0 comments 0 reactions 0 assignees View on GitHub
bug core P3 runners
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

[https://github.com/apache/beam/blob/master/runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/artifact/BeamFileSystemArtifactStagingService.java](https://github.com/apache/beam/blob/master/runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/artifact/BeamFileSystemArtifactStagingService.java) is the main implementation of ArtifactStagingService.

It stages artifacts into a directory; and in practice the passed staging session token is such that the directory is different for every job. This leads to 2 issues:
* It doesn't get cleaned up when the job finishes or even when the JobService shuts down, so we have disk space leaks if running a lot of jobs (e.g. a suite of ValidatesRunner tests)
* We repeatedly re-stage the same artifacts. Instead, ideally, we should identify that some artifacts don't need to be staged - based on knowing their md5. The artifact staging protocol has rudimentary support for this but may need to be modified.

CC: [~angoenka]

Imported from Jira [BEAM-4778](https://issues.apache.org/jira/browse/BEAM-4778). Original Jira may contain additional context.
Reported by: jkff.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.