diff options
author | Janak Ramakrishnan <janakr@google.com> | 2015-03-19 15:32:22 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@google.com> | 2015-03-20 14:34:46 +0000 |
commit | 6f49384fb69744b0d7a3542b0534dfb85d17de23 (patch) | |
tree | 582f760f04b8da0e5c69511d8ad64c01007c4688 /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java | |
parent | 1a03eccae276227853d693c208ff623b9cf3d902 (diff) |
Rolling back change because of subtle race condition when multiple actions insert ActionInputs into SingleBuildFileCache.
--
MOS_MIGRATED_REVID=89032980
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.java | 17 |
1 files changed, 6 insertions, 11 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 d7d713ba09..7b71fba451 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 @@ -71,6 +71,7 @@ import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.lib.vfs.Symlinks; import com.google.protobuf.ByteString; +import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.HashSet; @@ -454,8 +455,8 @@ public final class SkyframeActionExecutor { this.executorEngine = null; } - Path getExecRoot() { - return executorEngine.getExecRoot(); + File getExecRoot() { + return executorEngine.getExecRoot().getPathFile(); } boolean probeActionExecution(Action action) { @@ -1160,15 +1161,9 @@ public final class SkyframeActionExecutor { @Nullable @Override - public ActionInput getInputFromDigest(ByteString digest) throws IOException { - ActionInput file = perActionCache.getInputFromDigest(digest); - return file != null ? file : perBuildFileCache.getInputFromDigest(digest); - } - - @Override - public Path getInputPath(ActionInput input) { - // Resolving an input only requires the execRoot, which the per-action cache has. - return perActionCache.getInputPath(input); + public File getFileFromDigest(ByteString digest) throws IOException { + File file = perActionCache.getFileFromDigest(digest); + return file != null ? file : perBuildFileCache.getFileFromDigest(digest); } } } |