Skip to content

Commit e6809c9

Browse files
committed
Revert "Check the result of Future.cancel() when cancelling the other branch of dynamic execution."
This reverts commit 5b95d91.
1 parent a3a1310 commit e6809c9

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

src/main/java/com/google/devtools/build/lib/actions/DynamicStrategyRegistry.java

-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ enum DynamicMode {
3434
public String toString() {
3535
return name;
3636
}
37-
38-
public DynamicMode other() {
39-
return this == REMOTE ? LOCAL : REMOTE;
40-
}
4137
}
4238

4339
/**

src/main/java/com/google/devtools/build/lib/dynamic/DynamicSpawnStrategy.java

+1-11
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,7 @@ private static void stopBranch(
166166
spawn.getMnemonic(), strategyThatCancelled.get())));
167167
}
168168

169-
if (!branchToCancel.cancel(true)) {
170-
// This can happen if the other branch is local under local_lockfree and has returned
171-
// its result but not yet cancelled this branch, or if the other branch was already
172-
// cancelled for other reasons.
173-
if (!branchToCancel.isCancelled()) {
174-
throw new DynamicInterruptedException(
175-
String.format(
176-
"Execution of %s strategy stopped because %s strategy could not be cancelled",
177-
cancellingStrategy, cancellingStrategy.other()));
178-
}
179-
}
169+
branchToCancel.cancel(true);
180170
branchDone.acquire();
181171
} else {
182172
throw new DynamicInterruptedException(

0 commit comments

Comments
 (0)