diff options
author | ulfjack <ulfjack@google.com> | 2017-07-25 21:31:03 +0200 |
---|---|---|
committer | Jakob Buchgraber <buchgr@google.com> | 2017-07-26 10:35:00 +0200 |
commit | 3e62cafb97d89b157d48066e2ac7eca3adcdd931 (patch) | |
tree | b5fba6edc4f8dd85a8318042f9bb04095ea99ec3 /src/main/java/com/google/devtools/build | |
parent | 2b51f78a2617628f8d871f434838f0175114284d (diff) |
SkyframeActionExecutor.checkOutputs: clarify comment
The getMetadata call implicitly adds files to the metadata handler if they weren't known before,
which may include statting the file.
PiperOrigin-RevId: 163106987
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java | 6 |
1 files changed, 3 insertions, 3 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 1f4b1188c4..7f6e1801f3 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 @@ -949,9 +949,9 @@ public final class SkyframeActionExecutor implements ActionExecutionContextFacto private boolean checkOutputs(Action action, MetadataHandler metadataHandler) { boolean success = true; for (Artifact output : action.getOutputs()) { - // artifactExists has the side effect of potentially adding the artifact to the cache, - // therefore we only call it if we know the artifact is indeed not omitted to avoid any - // unintended side effects. + // getMetadata has the side effect of adding the artifact to the cache if it's not there + // already (e.g., due to a previous call to MetadataHandler.injectDigest), therefore we only + // call it if we know the artifact is not omitted. if (!metadataHandler.artifactOmitted(output)) { try { metadataHandler.getMetadata(output); |