aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-07-17 16:40:58 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-17 16:42:50 -0700
commitf309ad3be36363070e87eef0ee04b12f4956d601 (patch)
treedb154ca3e5b54bb4470ea9b5d071dd17f33c927c /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
parentceafeaef5977d0671c44c86864b9a4b2b0e5ee04 (diff)
Automated rollback of commit d491bf10f42e213292382c98a1dc439537f00f43.
*** Reason for rollback *** Still bugs lurking. See linked bug. *** Original change description *** Automated rollback of commit eb587075b0d6ffab1cf9e69ede1b7e547905e547. *** Reason for rollback *** Depot has been fixed. RELNOTES[INC]: If the same artifact is generated by two distinct but identical actions, and a downstream action has both those actions' outputs in its inputs, the artifact will now appear twice in the downstream action's inputs. If this causes problems in Skylark actions, you can use the uniquify=True argument in Args.add_args. PiperOrigin-RevId: 204997569
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
index 34c1b57e9e..a42fc65807 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
@@ -51,7 +51,6 @@ import com.google.devtools.build.lib.actions.Actions;
import com.google.devtools.build.lib.actions.AlreadyReportedActionExecutionException;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.Artifact.ArtifactExpander;
-import com.google.devtools.build.lib.actions.Artifact.OwnerlessArtifactWrapper;
import com.google.devtools.build.lib.actions.ArtifactPathResolver;
import com.google.devtools.build.lib.actions.ArtifactPrefixConflictException;
import com.google.devtools.build.lib.actions.CachedActionEvent;
@@ -147,8 +146,7 @@ public final class SkyframeActionExecutor {
// We don't want to execute the action again on the second entry to the SkyFunction.
// In both cases, we store the already-computed ActionExecutionValue to avoid having to compute it
// again.
- private ConcurrentMap<
- OwnerlessArtifactWrapper, Pair<ActionLookupData, FutureTask<ActionExecutionValue>>>
+ private ConcurrentMap<Artifact, Pair<ActionLookupData, FutureTask<ActionExecutionValue>>>
buildActionMap;
// Errors found when examining all actions in the graph are stored here, so that they can be
@@ -405,16 +403,13 @@ public final class SkyframeActionExecutor {
}
boolean probeActionExecution(Action action) {
- return buildActionMap.containsKey(new OwnerlessArtifactWrapper(action.getPrimaryOutput()));
+ return buildActionMap.containsKey(action.getPrimaryOutput());
}
private boolean actionReallyExecuted(Action action, ActionLookupData actionLookupData) {
Pair<ActionLookupData, ?> cachedRun =
Preconditions.checkNotNull(
- buildActionMap.get(new OwnerlessArtifactWrapper(action.getPrimaryOutput())),
- "%s %s",
- action,
- actionLookupData);
+ buildActionMap.get(action.getPrimaryOutput()), "%s %s", action, actionLookupData);
return actionLookupData.equals(cachedRun.getFirst());
}
@@ -454,8 +449,7 @@ public final class SkyframeActionExecutor {
actionLookupData));
// Check to see if another action is already executing/has executed this value.
Pair<ActionLookupData, FutureTask<ActionExecutionValue>> oldAction =
- buildActionMap.putIfAbsent(
- new OwnerlessArtifactWrapper(primaryOutput), Pair.of(actionLookupData, actionTask));
+ buildActionMap.putIfAbsent(primaryOutput, Pair.of(actionLookupData, actionTask));
// true if this is a non-shared action or it's shared and to be executed.
boolean isPrimaryActionForTheValue = oldAction == null;
@@ -466,10 +460,7 @@ public final class SkyframeActionExecutor {
actionTask = oldAction.second;
}
try {
- ActionExecutionValue value = actionTask.get();
- return isPrimaryActionForTheValue
- ? value
- : value.transformForSharedAction(action.getOutputs());
+ return actionTask.get();
} catch (ExecutionException e) {
Throwables.propagateIfPossible(e.getCause(),
ActionExecutionException.class, InterruptedException.class);