Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.3.0] Deduplicate locally executed path mapped spawns #23069

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Jul 23, 2024

When path mapping is enabled, different Spawns in the same build can have identical RemoteAction.ActionKeys and can thus provide remote cache hits for each other. However, cache hits are only possible after the first local execution has concluded and uploaded its result to the cache.

To avoid unnecessary duplication of local work, the first Spawn for each RemoteAction.ActionKey is tracked until its results have been uploaded and all other concurrently scheduled Spawns wait for it and then copy over its local outputs.

Fixes #21043

Closes #22556.

PiperOrigin-RevId: 655097996
Change-Id: I4368f9210c67a306775164d252aae122d8b46f9b

Closes #23060

When path mapping is enabled, different `Spawn`s in the same build can have identical `RemoteAction.ActionKey`s and can thus provide remote cache hits for each other. However, cache hits are only possible after the first local execution has concluded and uploaded its result to the cache.

To avoid unnecessary duplication of local work, the first `Spawn` for each `RemoteAction.ActionKey` is tracked until its results have been uploaded and all other concurrently scheduled `Spawn`s wait for it and then copy over its local outputs.

Fixes bazelbuild#21043

Closes bazelbuild#22556.

PiperOrigin-RevId: 655097996
Change-Id: I4368f9210c67a306775164d252aae122d8b46f9b
@fmeum fmeum requested a review from a team as a code owner July 23, 2024 10:32
@fmeum fmeum requested review from tjgq and removed request for a team July 23, 2024 10:32
@fmeum fmeum changed the title Deduplicate locally executed path mapped spawns [7.3.0] Deduplicate locally executed path mapped spawns Jul 23, 2024
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-Performance Issues for Performance teams team-Remote-Exec Issues and PRs for the Execution (Remote) team labels Jul 23, 2024
@fmeum fmeum requested a review from a team July 24, 2024 14:47
@iancha1992 iancha1992 enabled auto-merge July 24, 2024 17:46
@iancha1992
Copy link
Member

iancha1992 commented Jul 24, 2024

@tjgq can you please take a look at this one? The 7.3.0RC1 is scheduled for next Monday, July 29th. Thanks!

@keertk
Copy link
Member

keertk commented Jul 29, 2024

@tjgq friendly ping

@keertk keertk requested a review from meteorcloudy July 29, 2024 12:51
@iancha1992 iancha1992 added this pull request to the merge queue Jul 29, 2024
Merged via the queue into bazelbuild:release-7.3.0 with commit ffe1df5 Jul 29, 2024
52 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jul 29, 2024
@fmeum fmeum deleted the 23060-cherry branch July 29, 2024 18:40
fmeum added a commit to fmeum/bazel that referenced this pull request Aug 13, 2024
fmeum added a commit to fmeum/bazel that referenced this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Performance Issues for Performance teams team-Remote-Exec Issues and PRs for the Execution (Remote) team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants