1.4: executionTimeout property for async
We need a property on the semaphore isolated path for timeout now that we support async timeout.
Currently in the 1.4 RCs it uses the threadIsolated property for both, but that's confusing to set it for semaphoreIsolated configs.
The thread isolated property is execution.isolation.thread.timeoutInMilliseconds => https://github.com/Netflix/Hystrix/wiki/Configuration#executionisolationthreadtimeoutinmilliseconds
We could just have it be execution.isolation.semaphore.timeoutInMilliseconds but this is somewhat confusing as it won't apply to normal semaphore isolated HystrixCommand instances, only async HystrixObservableCommand instances. So perhaps execution.isolation.async.timeoutInMilliseconds or execution.isolation.observable.timeoutInMilliseconds?
Per our discussion today, I'll submit a pull request to add:
- execution.isolation.semaphore.timeoutInMilliseconds
- public Setter withTimeoutInMilliseconds(int value);
This property will do nothing for the case of an non-async command with semaphore isolation. By following existing conventions we do not need to duplicate many existing properties to support the async case. If we find additional properties which only apply to async, we may revisit this decision and scope it appropriately.
@KoltonAndrus I don't see this property referenced anywhere in the execution flow. Are you able to pick this back up and get that wired in?
After further thought, I think the ideal design is to have 1 timeout value defined, regardless of whether the command is sempahore- or thread-isolated.
Since only the async timeout mechanism is used now (as of #579), it's straightforward to wire a signal timeout into the AbstractCommand flow. The only interesting thing is the configuration API. My view is that the config setting should be agnostic of semaphore or thread isolation, and the config that is thread-specific (HystrixCommandProperties.executionIsolationThreadTimeoutInMilliseconds) should be deprecated.
Closed by #664