-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
benjchristensen
merged 39 commits into
Netflix:master
from
benjchristensen:hystrix-1-4-non-blocking-merge
Mar 11, 2014
Merged
Hystrix 1.4 - Async/Non-Blocking #218
benjchristensen
merged 39 commits into
Netflix:master
from
benjchristensen:hystrix-1-4-non-blocking-merge
Mar 11, 2014
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
changes to support non blocking behavior
- updated unit test that no longer worked with new Scheduler implementation
- open questions on this class
- 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
- all unit tests compiling - not all are passing as the RxJava 0.17 upgrade is still in process
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.
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.
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
Whoops.
- 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.
- all unit tests are now passing with semaphore and thread isolation
Update tests to assert isExecutedInThread true/false so we are sure the tests are getting what they expect.
Eliminate the AbstractHystrixCommand inheritance.
... breaks things (thought nothing would implement this interface, but alas some things do).
Fixes issue reported in #212 This was also fixed in 1.3.10
…-merge Conflicts: hystrix-core/build.gradle hystrix-core/src/main/java/com/netflix/hystrix/HystrixCollapser.java hystrix-core/src/main/java/com/netflix/hystrix/HystrixCommand.java hystrix-core/src/main/java/com/netflix/hystrix/strategy/HystrixPlugins.java hystrix-core/src/main/java/com/netflix/hystrix/strategy/concurrency/HystrixConcurrencyStrategy.java hystrix-core/src/main/java/com/netflix/hystrix/strategy/concurrency/HystrixContexSchedulerAction.java hystrix-core/src/main/java/com/netflix/hystrix/strategy/concurrency/HystrixContextCallable.java hystrix-core/src/main/java/com/netflix/hystrix/strategy/concurrency/HystrixContextRunnable.java hystrix-core/src/main/java/com/netflix/hystrix/strategy/concurrency/HystrixContextScheduler.java
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
…-merge Hystrix 1.4 - Async/Non-Blocking
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for async/non-blocking sources via the new
HystrixObservableCommand
. It also changesHystrixCommand
to useHystrixObservableCommand
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.