aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-06-13 21:57:19 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-13 21:58:58 -0700
commitb9d8d58ef58645544c84ac4bcace869adad7abe5 (patch)
treef4faa461747d1e96b299ed67a3f520679d5481b2 /src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
parent594e8588bcd0257c5a3c7e1dd8eae82ce28173b2 (diff)
Add functionality to make certain SkyValues unshareable, meaning they are not serialized. Tag TestCompletionValue and any ActionExecutionValue coming from a NotifyOnActionCacheHit (i.e., tests) like that. To make such values really not shared, request the ActionExecutionValue from TestCompletionFunction as opposed to the ArtifactValue (propagating the unshareable bit up seemed like too much fuss, and I have a dream of getting rid of ArtifactValue anyway).
PiperOrigin-RevId: 200504358
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
index 612632e0f6..6f5044fbbf 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
@@ -105,10 +105,6 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
int actionIndex = actionLookupData.getActionIndex();
Action action = actionLookupValue.getAction(actionIndex);
skyframeActionExecutor.noteActionEvaluationStarted(actionLookupData, action);
- // TODO(bazel-team): Non-volatile NotifyOnActionCacheHit actions perform worse in Skyframe than
- // legacy when they are not at the top of the action graph. In legacy, they are stored
- // separately, so notifying non-dirty actions is cheap. In Skyframe, they depend on the
- // BUILD_ID, forcing invalidation of upward transitive closure on each build.
if ((action.isVolatile() && !(action instanceof SkyframeAwareAction))
|| action instanceof NotifyOnActionCacheHit) {
// Volatile build actions may need to execute even if none of their known inputs have changed.
@@ -413,11 +409,12 @@ public class ActionExecutionFunction implements SkyFunction, CompletionReceiver
"Error, we're not re-executing a "
+ "SkyframeAwareAction which should be re-executed unconditionally. Action: %s",
action);
- return new ActionExecutionValue(
+ return ActionExecutionValue.create(
metadataHandler.getOutputArtifactData(),
metadataHandler.getOutputTreeArtifactData(),
metadataHandler.getAdditionalOutputData(),
- /*outputSymlinks=*/ null);
+ /*outputSymlinks=*/ null,
+ action instanceof NotifyOnActionCacheHit);
}
// Delete the metadataHandler's cache of the action's outputs, since they are being deleted.