Skip to content

Commit

Permalink
Add some additional debugging if a dep is unexpectedly absent.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 207178336
  • Loading branch information
janakdr authored and Copybara-Service committed Aug 2, 2018
1 parent b6fa8eb commit 1ae4fc2
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,20 @@ private Map<SkyKey, SkyValue> batchPrefetch(
Reason.PREFETCH,
depKeysAsSet == null ? depKeys.getAllElementsAsIterable() : depKeysAsSet);
if (batchMap.size() != depKeys.numElements()) {
NodeEntry inFlightEntry = null;
try {
inFlightEntry = evaluatorContext.getGraph().get(null, Reason.OTHER, requestor);
} catch (InterruptedException e) {
// We're crashing, don't mask it.
Thread.currentThread().interrupt();
}
throw new IllegalStateException(
"Missing keys for "
+ keyForDebugging
+ ": "
+ Sets.difference(depKeys.toSet(), batchMap.keySet()));
+ Sets.difference(depKeys.toSet(), batchMap.keySet())
+ "\n\n"
+ inFlightEntry);
}
ImmutableMap.Builder<SkyKey, SkyValue> depValuesBuilder =
ImmutableMap.builderWithExpectedSize(batchMap.size());
Expand Down

0 comments on commit 1ae4fc2

Please sign in to comment.