Custom HystrixConcurrencyStrategy and Fallbacks

91 views
Skip to first unread message

Joseph Athman

unread,
Sep 6, 2017, 9:54:26 AM9/6/17
to HystrixOSS
Basically I'm just trying to raise some visibility to https://github.com/Netflix/Hystrix/issues/1653 which concerns how a change was made to Hystrix which changes which thread is running when a custom concurrency strategy is executed for a fallback. Prior to the changes in https://github.com/Netflix/Hystrix/pull/1570, when the custom concurrency strategy's wrapCallable was invoked, it was executed on the main thread, however now it is executed on the timer thread. As far as I can tell there isn't a convenient way to be able to pass along thread local variables from the main thread anymore. I'm not sure if this was an intentional part of the change or not, but it definitely changes some functionality. Any ideas how we can work around this now?

Joe

Andy Kiesler

unread,
Jan 21, 2018, 6:51:26 PM1/21/18
to HystrixOSS
Per the JavaDocs I believe the intent is that you write the code to copy the state from any ThreadLocals yourself. You may also want to look getRequestVariable which provides request scoped variables similar to ThreadLocals. I'm not personally familiar with their usage so I can't provide you much direction on their usage.
Reply all
Reply to author
Forward
0 new messages