Skip to content

Commit b091cb0

Browse files
committed
Add comments
1 parent c8acced commit b091cb0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/main/java/com/google/devtools/build/lib/remote/AbstractActionInputPrefetcher.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ private final class DirectoryTracker {
110110
private final ConcurrentHashMap<Path, DirectoryState> directoryStateMap =
111111
new ConcurrentHashMap<>();
112112

113-
public void clear() {
114-
directoryStateMap.clear();
115-
}
116-
117113
/**
118114
* Marks a directory as temporarily writable.
119115
*
@@ -264,6 +260,10 @@ private static boolean shouldDownloadFile(Path path, FileArtifactValue metadata)
264260

265261
protected abstract boolean canDownloadFile(Path path, FileArtifactValue metadata);
266262

263+
/**
264+
* If true, then all previously acquired knowledge of the file system state of this path (e.g. the
265+
* existence of tree artifact directories or previously downloaded files) must be discarded.
266+
*/
267267
protected abstract boolean forceRefetch(Path path);
268268

269269
/**

src/main/java/com/google/devtools/build/lib/remote/RemoteActionInputFetcher.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ protected ListenableFuture<Void> doDownloadFile(
155155
}
156156

157157
public void handleRewoundActionOutputs(Collection<Artifact> outputs) {
158+
// SkyframeActionExecutor#prepareForRewinding does *not* call this method because the
159+
// RemoteActionFileSystem corresponds to an ActionFileSystemType with inMemoryFileSystem() ==
160+
// true. While it is true that resetting outputDirectoryHelper isn't necessary to undo the
161+
// caching of output directory creation during action preparation, we still need to reset here
162+
// since outputDirectoryHelper is also used by AbstractActionInputPrefetcher.
158163
outputDirectoryHelper.invalidateTreeArtifactDirectoryCreation(outputs);
159164
for (Artifact output : outputs) {
160165
// Action templates have TreeFileArtifacts as outputs, which isn't supported by the trie. We

0 commit comments

Comments
 (0)