From 3e62cafb97d89b157d48066e2ac7eca3adcdd931 Mon Sep 17 00:00:00 2001 From: ulfjack Date: Tue, 25 Jul 2017 21:31:03 +0200 Subject: 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 --- .../google/devtools/build/lib/skyframe/SkyframeActionExecutor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/skyframe') 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); -- cgit v1.2.3