Hystrix icon indicating copy to clipboard operation
Hystrix copied to clipboard

1.4: executionTimeout property for async

Open benjchristensen opened this issue 12 years ago • 5 comments

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.

benjchristensen avatar Sep 01 '14 17:09 benjchristensen

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?

benjchristensen avatar Sep 18 '14 19:09 benjchristensen

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 avatar Sep 19 '14 22:09 KoltonAndrus

@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?

mattrjacobs avatar Jan 07 '15 06:01 mattrjacobs

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.

mattrjacobs avatar Feb 10 '15 05:02 mattrjacobs

Closed by #664

mattrjacobs avatar Feb 10 '15 06:02 mattrjacobs