Temporarily disable local execution deduplication for Java compilation actions#23307
Closed
fmeum wants to merge 1 commit intobazelbuild:masterfrom
Closed
Temporarily disable local execution deduplication for Java compilation actions#23307fmeum wants to merge 1 commit intobazelbuild:masterfrom
fmeum wants to merge 1 commit intobazelbuild:masterfrom
Conversation
The deduplication action is prone to race conditions with actions that modify spawn contents after execution, which currently only Java compilation actions do.
94e1850 to
51bd64d
Compare
tjgq
approved these changes
Aug 20, 2024
Collaborator
Author
|
@bazel-io fork 7.4.0 |
Collaborator
Author
Contributor
|
#23382 is exactly what I had in mind for async uploading :) I will review it tomorrow (today I'm traveling) but we can drop this one. |
copybara-service bot
pushed a commit
that referenced
this pull request
Aug 27, 2024
When an action may modify a spawn's outputs after execution, the upload of outputs to the cache and reuse for deduplicated actions need to happen synchronously directly after spawn execution to avoid a race. This commit implements this for cache uploads by marking all actions with this property and simply disabling async upload for all spawns executed by such actions. For output reuse, all executions deduplicated against the first one register atomically upon deduplication and cause the cache upload to wait for all of them to complete reuse. Fixes #22501 Fixes #23288 Work towards #21578 Closes #23307 (no longer needed) Closes #23382. PiperOrigin-RevId: 668101364 Change-Id: Ice75dbe14a7dd46e02ecb096d2b2a30940216356
fmeum
added a commit
to fmeum/bazel
that referenced
this pull request
Sep 19, 2024
When an action may modify a spawn's outputs after execution, the upload of outputs to the cache and reuse for deduplicated actions need to happen synchronously directly after spawn execution to avoid a race. This commit implements this for cache uploads by marking all actions with this property and simply disabling async upload for all spawns executed by such actions. For output reuse, all executions deduplicated against the first one register atomically upon deduplication and cause the cache upload to wait for all of them to complete reuse. Fixes bazelbuild#22501 Fixes bazelbuild#23288 Work towards bazelbuild#21578 Closes bazelbuild#23307 (no longer needed) Closes bazelbuild#23382. PiperOrigin-RevId: 668101364 Change-Id: Ice75dbe14a7dd46e02ecb096d2b2a30940216356
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The deduplication action is prone to race conditions with actions that modify spawn contents after execution, which currently only Java compilation actions do.
It's still useful and expected to be functional for Starlark, C++ and
JavaResourceJaractions.Work towards #23288