diff options
author | Mark Schaller <mschaller@google.com> | 2015-08-10 20:11:56 +0000 |
---|---|---|
committer | Laszlo Csomor <laszlocsomor@google.com> | 2015-08-11 07:53:24 +0000 |
commit | 593d3e0577c00c910834801732cb81cb16a3dac0 (patch) | |
tree | 33bfc1a125491c319a4fc71c01b020438e7d231e /src/main/java/com/google/devtools/build/skyframe/InvalidatingNodeVisitor.java | |
parent | d12c398f96f15f1cfaf9b509c19da1964d422ba6 (diff) |
Don't return SkyValue when dirtying node
The invalidator is no longer using the SkyValue, so there's no need
to return it when dirtying a node.
--
MOS_MIGRATED_REVID=100307211
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe/InvalidatingNodeVisitor.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/skyframe/InvalidatingNodeVisitor.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/InvalidatingNodeVisitor.java b/src/main/java/com/google/devtools/build/skyframe/InvalidatingNodeVisitor.java index e0d5b8c0e9..7e2d2247d0 100644 --- a/src/main/java/com/google/devtools/build/skyframe/InvalidatingNodeVisitor.java +++ b/src/main/java/com/google/devtools/build/skyframe/InvalidatingNodeVisitor.java @@ -351,11 +351,10 @@ public abstract class InvalidatingNodeVisitor extends AbstractQueueVisitor { } // This entry remains in the graph in this dirty state until it is re-evaluated. - Pair<? extends Iterable<SkyKey>, ? extends SkyValue> depsAndValue = - entry.markDirty(isChanged); + Iterable<SkyKey> deps = entry.markDirty(isChanged); // It is not safe to interrupt the logic from this point until the end of the method. // Any exception thrown should be unrecoverable. - if (depsAndValue == null) { + if (deps == null) { // Another thread has already dirtied this node. Don't do anything in this thread. pendingVisitations.remove(invalidationPair); return; @@ -368,12 +367,12 @@ public abstract class InvalidatingNodeVisitor extends AbstractQueueVisitor { // Remove this node as a reverse dep from its children, since we have reset it and it no // longer lists its children as direct deps. - Map<SkyKey, NodeEntry> children = graph.getBatch(depsAndValue.first); - if (children.size() != Iterables.size(depsAndValue.first)) { - Set<SkyKey> deps = ImmutableSet.copyOf(depsAndValue.first); + Map<SkyKey, NodeEntry> children = graph.getBatch(deps); + if (children.size() != Iterables.size(deps)) { + Set<SkyKey> depsSet = ImmutableSet.copyOf(deps); throw new IllegalStateException("Mismatch in getBatch: " + key + ", " + entry + "\n" - + Sets.difference(deps, children.keySet()) + "\n" - + Sets.difference(children.keySet(), deps)); + + Sets.difference(depsSet, children.keySet()) + "\n" + + Sets.difference(children.keySet(), depsSet)); } for (NodeEntry child : children.values()) { child.removeReverseDep(key); |