When a shared action depends on a shared completion future, don't assert that the future is pending, even if the environment didn't view the future as done when it was added as an external dep: the future can transition to done (by being cancelled) in a race with the environment's checking.
@@ -104,16 +104,7 @@ final class ActionExecutionState {
SettableFuture<Void> dummyFuture = SettableFuture.create();
env.dependOnFuture(dummyFuture);
dummyFuture.set(null);
- return null;
}
- // No other thread can modify completionFuture until we exit the synchronized block.
- Preconditions.checkState(
- !completionFuture.isDone(),
- "Completion future modified? %s %s %s %s",
- this.actionLookupData,
- actionLookupData,
- action,
- completionFuture);
return null;
}
result = state.get();
