New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hystrix 1.4 - Async/Non-Blocking #218

merged 39 commits into from Mar 11, 2014


None yet
2 participants
Copy link

benjchristensen commented Mar 11, 2014

This adds support for async/non-blocking sources via the new HystrixObservableCommand. It also changes HystrixCommand to use HystrixObservableCommand so all functionality goes through the same code path.

This achieves the "Asynchronous Executables" feature in #11

Further information and documentation will be written for the release notes.

This code has been running on a single instance in production for a few days at Netflix so appears good enough to release as beta or release candidate. The intent is to allow a week or two of production testing at Netflix before providing an official 1.4.0 release.

neerajrj and others added some commits Nov 13, 2013

Upgrade HystrixCommand to RxJava 0.17
- updated unit test that no longer worked with new Scheduler implementation
Moved Unit Tests
- they have outgrown the inner class model
- I have made many things package accessible to make tests work
- several are still breaking because they are accessing private members and I have not decided how to handle them
Opened Access for Unit Tests
- all unit tests compiling
-  not all are passing as the RxJava 0.17 upgrade is still in process
Fixed Unit Test: Subscription Behavior Changed
RxJava 0.17 handles synchronous Subscriptions now so this code needed to be changed otherwise the exceptions never got thrown since the isUnsubscribed() would already be true.
Fixed Unit Test: Class Names
Deriving the full class names for these inner classes was being done wrong and resulted in bad class names when the unit tests got moved.
Make UnitTests use NonBlocking Observables
This reveals the bugs in the current HystrixNonBlockingCommand implementation.
- unit tests are all passing with both async and sync Observables
- defaults to semaphore isolation but allows thread isolation if an Observable source is synchronous
TimeoutObservable -> HystrixObservableTimeoutOperator
- Use "Operator" name as that's what it is.
- Use HystrixObservableTimeoutOperator instead of TimeoutOperator so in a stacktrace it's clear it's the Hystrix variant and not the normal RxJava TimeoutOperator.
HystrixObservableCommand Fixes
- all unit tests are now passing with semaphore and thread isolation
Fix isExecutedInThread
Update tests to assert isExecutedInThread true/false so we are sure the tests are getting what they expect.

benjchristensen added some commits Feb 26, 2014

HystrixCommand composes HystrixObservableCommand
Eliminate the AbstractHystrixCommand inheritance.
Revert HystrixExecutable change
... breaks things (thought nothing would implement this interface, but alas some things do).
BugFix: Plugin WrapCallable of RequestContext in Timeout
Fixes issue reported in #212
This was also fixed in 1.3.10
Merge branch 'hystrix-1.4-non-blocking' into hystrix-1-4-non-blocking…

HystrixCollapser onComplete fix
Wait until onComplete before emitting the results so that all metrics, event logs, etc are done.

benjchristensen added a commit that referenced this pull request Mar 11, 2014

@benjchristensen benjchristensen merged commit 2118664 into Netflix:master Mar 11, 2014

@benjchristensen benjchristensen deleted the benjchristensen:hystrix-1-4-non-blocking-merge branch Mar 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment