Skip to content

Latest commit

 

History

History
559 lines (383 loc) · 41.6 KB

CHANGELOG.md

File metadata and controls

559 lines (383 loc) · 41.6 KB

Hystrix Releases

Version 1.4.1 (Maven Central, Bintray)

  • Pull 716 Fixed backwards-incompatibility where .execute(), .queue(), .observe(), .toObservable() were all made final in 1.4.0

Version 1.4.0 (Maven Central, Bintray)

This version adds HystrixObservableCommand and implements both it and HystrixCommand in terms of Observables.

A HystrixObservableCommand allows for fully non-blocking commands that can be composed as part of a larger Observable chain. See the wiki for more details on usage. Here's an example (using Java 8):

public class ObservableHttpCommand extends HystrixObsverableCommand<BackendResponse> {

@Override
protected Observable<BackendResponse> construct() {
    return httpClient.submit(HttpClientRequest.createGet("/mock.json?numItems=" + numItems))
        .flatMap((HttpClientResponse<ByteBuf> r) -> r.getContent()
        .map(b -> BackendResponse.fromJson(new ByteBufInputStream(b))));
    }

@Override
protected Observable<BackendResponse> resumeWithFallback() {
    return Observable.just(new BackendResponse(0, numItems, new String[] {}));
}}

Because an Observable represents a stream of data, your HystrixObservableCommand may now return a stream of data, and supply a stream of data as a fallback. The methods to do so are construct() and resumeWithFallback(), respectively. All other aspects of the Hystrix state machine work the same in a HystrixCommand. See this wiki page for a diagram of this state machine.

The public API of HystrixCommand is unchanged, though the internals have significantly changed. Some bugfixes are now possible that affect Hystrix semantics:

  • Timeouts now apply to semaphore-isolated commands as well as thread-isolated commands. Before 1.4.x, semaphore-isolated commands could not timeout. They now have a timeout registered on another (HystrixTimer) thread, which triggers the timeout flow. If you use semaphore-isolated commands, they will now see timeouts. As all HystrixCommands have a default timeout, this potentially affects all semaphore-isolated commands.
  • Timeouts now fire on HystrixCommand.queue(), even if the caller never calls get() on the resulting Future. Before 1.4.x, only calls to get() triggered the timeout mechanism to take effect.

You can see more in-depth examples of how the new functionality of Hystrix 1.4 is used at Netflix/ReactiveLab.

You can learn more about Observables and RxJava at Netflix/RxJava.

As this was a major refactoring of Hystrix internals, we (Netflix) have run a release candidate of Hystrix 1.4 in canaries and production over the last month to gain confidence.

  • Pull 701 Fix Javadoc warnings
  • Pull 700 Example code for publishing to Graphite

Version 1.4.0 Release Candidate 9 (Maven Central, Bintray)

NOTE: This code is believed to be production worthy. As of now, there are no known bugs preventing this becoming 1.4.0. Please report any design issues/questions, bugs, or any observations about this release to the Issues page.

  • Pull 697 Add execution event for FALLBACK_REJECTION and unit tests
  • Pull 696 Upgrade to RxJava 1.0.7
  • Pull 694 Make execution timeout in HystrixCommandProperties work in the case when classes extend HystrixCommandProperties
  • Pull 693 Hystrix Dashboard sorting issue

Version 1.4.0 Release Candidate 8 (Maven Central, Bintray)

NOTE: This code is believed to be production worthy. As of now, there are no known bugs preventing this becoming 1.4.0. Please report any design issues/questions, bugs, or any observations about this release to the Issues page.

  • Pull 691 HystrixCommandTest test with large number of semaphores
  • Pull 690 Add back ExceptionThreadingUtility
  • Pull 688 Add metrics for EMIT and FALLBACK_EMIT
  • Pull 687 Fixed issue where fallback rejection was also incrementing fallback failure metric
  • Pull 686 HystrixCommandTest Unit test refactoring
  • Pull 683 Add and Deprecate pieces of execution hook API to be more consistent
  • Pull 681 Add cache hit execution hook
  • Pull 680 Add command rejection metrics for HystrixThreadPools

Version 1.4.0 Release Candidate 7 (Maven Central, Bintray)

NOTE: This code is believed to be production worthy. As of now, there are no known bugs preventing this becoming 1.4.0. Please report any design issues/questions, bugs, or any observations about this release to the Issues page

  • Pull 678 Fix current concurrent execution count
  • Pull 676 Add test to confirm that bad requests do not affect circuit breaker's computed error percentage
  • Pull 675 Deprecate method names for executionTimeout that are thread-specific
  • Pull 672 Limit the thread-interrupt behavior to occur only on timeouts
  • Pull 669 Added unit tests to demonstrate non-blocking semaphore timeout
  • Pull 667 Added rolling max counter for command execution
  • Pull 666 Added missing licenses
  • Pull 665 Added comment to HystrixConcurrencyStrategy about non-idempotency of strategy application
  • Pull 647 Tie command property to thread interrupt
  • Pull 645 Remove incorrect reference to async timeout
  • Pull 644 Add RequestCollapser metrics to Yammer Metrics Publisher
  • Pull 643 Stress-test HystrixObservalbeCollapser
  • Pull 642 Fix flakiness of HystrixObservableCommandTest.testRejectedViaSemaphoreIsolation
  • Pull 641 Fix flakiness of testSemaphorePermitsInUse
  • Pull 608 Make HystrixObservableCommand handle both sync and async exceptions
  • Pull 607 Upgrade RxJava from 1.0.4 to 1.0.5
  • Pull 604 Added EMIT and FALLBACK_EMIT event types that get emitted in HystrixObservableCommand
  • Pull 599 Added metrics to HystrixObservableCollapser
  • Pull 596 Fixed HystrixContextScheduler to conform with RxJava Worker contract
  • Pull 583 Style and consistency fixes
  • Pull 582 Add more unit tests for non-blocking HystrixCommand.queue()
  • Pull 580 Unit test to demonstrate fixed non-blocking timeout for HystrixCommand.queue()
  • Pull 579 Remove synchronous timeout
  • Pull 577 Upgrade language level to Java7
  • Pull 576 Add request collapser metrics
  • Pull 573 Fix link to CHANGELOG.md in README.md
  • Pull 572 Add bad request metrics at the command granularity
  • Pull 567 Comment out flaky unit-tests
  • Pull 566 Fix hardcoded groupname in CodaHale metrics publisher
  • Commit 6c08d9 Bumped nebula.netflixoss from 2.2.3 to 2.2.5
  • Pull 562 Build changes to nebula.netflixoss (initially submitted as Pull 469)

Version 1.4.0 Release Candidate 6 (Maven Central)

NOTE: This code is believed to be production worthy but is still a "Release Candidate" until these possible functional or design issues are resolved.

  • Pull 534 Bump RxJava to 1.0.4
  • Pull 532 Hystrix-Clojure: Fix typo
  • Pull 531 Move onThreadStart execution hook after check that wrapping thread timed out
  • Pull 530 Add shutdown hook to metrics servlet for WebSphere
  • Pull 527 Creating a synthetic exception in the semaphore execution and short-circuited case
  • Pull 526 Move onRunSuccess/onRunError and thread-pool book-keeping to Hystrix thread
  • Pull 524 Change calls from getExecutedCommands() to getAllExecutedCommands()
  • Pull 516 Updated HystrixServoMetricsPublisher initalization of singleton
  • Pull 489 Javanica: Request Caching
  • Pull 512 Add execution hook Javadoc
  • Pull 511 Fix missing onComplete hook call when command short-circuits and missing onRunSuccess hook call in thread-timeout case
  • Pull 466 Add unit tests to HystrixCommand and HystrixObservableCommand
  • Pull 465 Handle error in construction of HystrixMetricsPoller
  • Pull 457 Fixing resettability of HystrixMetricsPublisherFactory
  • Pull 451 Removed ExceptionThreadingUtility
  • Pull 366 Added support to get command start time in Nanos
  • Pull 456 Allow hooks to generate HystrixBadRequestExceptions that get handled appropriately
  • Pull 454 Add tests around HystrixRequestLog in HystrixObservableCommand
  • Pull 453 Resettable command and thread pool defaults
  • Pull 452 Make HystrixPlugins resettable
  • Pull 450 Add fallback tests to HystrixObservableCommand
  • Pull 449 Move thread completion bookkeeping to end of chain
  • Pull 447 Synchronous queue fix
  • Pull 376 Javanica README cleanup
  • Pull 378 Exection hook call sequences (based on work submitted in Pull 327)
  • Pull 374 RequestBatch logging
  • Pull 371 Defer creation of IllegalStateException in collapser flow (based on work submitted in Pull 264)
  • Pull 369 Added basic auth to Hystrix Dashboard (based on work submitted in Pull 336)
  • Pull 367 Added thread pool metrics back to execution flow (based on test submitted in Pull 339)
  • Pull 365 Fix Javadoc for HystrixCommand.Setter
  • Pull 364 Upgrade servo to 0.7.5
  • Pull 362 Fixed hystrix-rxnetty-metrics-stream unit tests
  • Pull 359 Fixed Javanica unit tests
  • Pull 361 Race condition when creating HystrixThreadPool (initially submitted as Pull 270)
  • Pull 358 Fixed Clojure unit tests that failed with RxJava 1.0
  • Commit 2edcd5 Upgrade to core-metrics 3.0.2
  • Pull 310 Osgi-ify hystrix-core, hystrix-examples
  • Pull 340 Race condition when creating HystrixThreadPool
  • Pull 343 Added 3 new constructors for common command setup
  • Pull 347 Javanica: Allow for @HystrixCommand to be used on parameterized return type
  • Pull 353 Fixing a hystrix-examples compilation failure
  • Pull 338 API Changes after design review of Issue 321
  • Pull 344 Upgrade to Gradle 1.12
  • Pull 334 Javanica: Hystrix Error Propagation
  • Pull 326 Javanica: Added support for setting threadPoolProperties through @HystrixCommand annotation
  • Pull 318 HystrixAsyncCommand and HystrixObservableCommand
  • Pull 316 Add support for execution.isolation.semaphore.timeoutInMilliseconds

Version 1.3.20 (Maven Central)

Version 1.3.19 (Maven Central)

  • Pull 348 Javanica: Allow for @HystrixCommand to be used on parameterized return type
  • Pull 329 Javanica: allowing configuration of threadPoolProperties through @HystrixCommand annotation

Version 1.4.0 Release Candidate 5 (Maven Central)

NOTE: This code is believed to be production worthy but is still a "Release Candidate" until these possible functional or design issues are resolved.

  • Pull 314 RxJava 0.20 and Remove Deprecated Usage
  • Pull 307 Dashboard: Avoid NPE when 'origin' parameter not present

Version 1.3.18 (Maven Central)

  • Pull 305 Removing deprecated RxJava usage

Version 1.3.17 (Maven Central)

Version 1.4.0 Release Candidate 4 (Maven Central)

NOTE: This code is NOT considered production worthy yet, hence the "Release Candidate" status.

This fixes some bugs and changes the HystrixObservableCollapser signature to support Observable batches.

  • Pull 256 Fix Race Condition on Timeout
  • Pull 261 New signature for HystrixObservableCollapser
  • Pull 254 Remove jsr305 Dependency
  • Pull 260 RxJava 0.18.2
  • Pull 253 Handling InterruptedExceptions in the HystrixMetricsStreamServlet

Version 1.4.0 Release Candidate 3 (Maven Central)

NOTE: This code is NOT considered production worthy yet, hence the "Release Candidate" status.

This adds non-blocking support to the collapser via the HystrixObservableCollapser type, fixes some bugs and upgrades to RxJava 0.18.

  • Pull 245 HystrixObservableCollapser
  • Pull 246 RxJava 0.18
  • Pull 250 Tripped CircuitBreaker Wouldn't Close Under Contention
  • Pull 243 Update servo to 0.6
  • Pull 240 Add missing reset for CommandExecutionHook in HystrixPlugins.UnitTest
  • Pull 244 Javanica: Cleaner error propagation

Version 1.4.0 Release Candidate 2 (Maven Central)

NOTE: This code is NOT considered production worthy yet, hence the "Release Candidate" status.

This fixes a bug found in Release Candidate 1 that caused the semaphore limits to be applied when thread isolation was chosen.

It also stops scheduling callbacks onto new threads and lets the Hystrix threads perform the callbacks.

  • Pull 238 Fix for Semaphore vs Thread Isolation Bug
  • Pull 230 Javanica Module: Added support for Request Cache and Reactive Execution

Version 1.4.0 Release Candidate 1 (Maven Central)

This is the first release candidate of 1.4.0 that includes HystrixObservableCommand (Source) that supports bulkheading asynchronous, non-blocking sources.

NOTE: This code is NOT considered production worthy yet, hence the "Release Candidate" status.

It has run for 1 day on a single machine taking production traffic at Netflix. This is sufficient for us to proceed to a release candidate for official canary testing, but we intend to test for a week or two before doing a final release.

Here is a very basic example using Java 8 to make an HTTP call via Netty and receives a stream of chunks back:

    public static void main(String args[]) {
        HystrixObservableCommand<String> command = bulkheadedNetworkRequest("www.google.com");
        command.toObservable()
                // using BlockingObservable.forEach for demo simplicity
                .toBlockingObservable().forEach(d -> System.out.println(d));
        System.out.println("Time: " + command.getExecutionTimeInMilliseconds() 
                + "  Events: " + command.getExecutionEvents());
    }

    public static HystrixObservableCommand<String> bulkheadedNetworkRequest(final String host) {
        return new HystrixObservableCommand<String>(HystrixCommandGroupKey.Factory.asKey("http")) {

            @Override
            protected Observable<String> run() {
                return directNetworkRequest(host);
            }

            @Override
            protected Observable<String> getFallback() {
                return Observable.just("Error 500");
            }

        };
    }

    public static Observable<String> directNetworkRequest(String host) {
        return RxNetty.createHttpClient(host, 80)
                .submit(HttpClientRequest.createGet("/"))
                .flatMap(response -> response.getContent())
                .map(data -> data.toString(Charset.defaultCharset()));
    }
  • Pull 218 Hystrix 1.4 - Async/Non-Blocking
  • Pull 217 Javanica: Added support for "Reactive Execution" and "Error Propagation"
  • Pull 219 Restore HystrixContext* Constructors without ConcurrencyStrategy

Version 1.3.16 (Maven Central)

  • Pull 258 Skip CachedObservableOriginal when no getCacheKey()
  • Pull 259 Fix #257 with RxJava 0.18.2

Version 1.3.15 (Maven Central)

  • Pull 248 RxJava 0.18 for Hystrix
  • Pull 249 Tripped CircuitBreaker Wouldn't Close Under Contention
  • Pull 229 Javanica: Added support for Request Cache and Reactive Execution
  • Pull 242 Javanica: Cleaner error propagation

Version 1.3.14 (not released)

  • Pull 228 Upgrade 1.3.x to RxJava 0.17.1

Version 1.3.13 (Maven Central)

Version 1.3.12 (Maven Central)

  • Pull 214 HystrixContextCallable/Runnable Constructors

Version 1.3.11 (Maven Central)

  • We'll ignore this release ever happened. Exact same binary as 1.3.10. (It helps to push code to Github before releasing.)

Version 1.3.10 (Maven Central)

  • Pull 211 Update Javassist version to 3.18.1-GA
  • Pull 213 BugFix: Timeout does not propagate request context
  • Pull 204 deploying hystrix dashboard on tomcat, SLF4J complains about a missing implementation
  • Pull 199 Add new module for publishing metrics to Coda Hale Metrics version 3

Version 1.3.9 (Maven Central)

  • Pull 210 HystrixContextScheduler was not wrapping the Inner Scheduler
  • Pull 206 Bugfix ExceptionThreadingUtility
  • Pull 203 Made HystrixTimer initialization thread-safe

Version 1.3.8 (Maven Central)

  • Pull 194 BugFix: Do not overwrite user thread duration in case of timeouts

Version 1.3.7 (Maven Central)

  • Pull 189 BugFix: Race condition between run() and timeout
  • Pull 190 BugFix: ConcurrencyStrategy.wrapCallable was not being used on callbacks

Version 1.3.6 (Maven Central)

  • Pull 181 [hystrix-contrib/hystrix-clj] Making Command keys quantified by namespaces
  • Pull 182 Removing unused Legend component latent. Removed from html templates/css
  • Pull 183 Bugfix to HystrixBadRequestException handling
  • Pull 184 BugFix: queue() BadRequestException Handling on Cached Response
  • Pull 185 BugFix: Observable.observeOn Scheduler Lost RequestContext
  • 0fb0d3d RxJava 0.14

Version 1.3.5 (Maven Central)

Version 1.3.4 (Maven Central)

Version 1.3.3 (Maven Central)

Version 1.3.2 (Maven Central)

  • Pull 173 Fix Exception vs Throwable typo in preparation for RxJava 0.11.0

Version 1.3.1 (Maven Central)

  • Pull 170 Add rx support to hystrix-clj

Version 1.3.0 (Maven Central)

This version integrations Hystrix with RxJava to enable non-blocking reactive execution and functional composition.

Async execution can now be done reactively with the observe() method and it will callback when the value is received:

Observable<String> s = new CommandHelloWorld("World").observe();

A simple example of subscribing to the value (using a Groovy lambda instead of anonymous inner class):

s.subscribe({ value -> println(value) })

A "Hello World" example of reactive execution can be found on the wiki.

More can be learned about RxJava and the composition features at https://github.com/Netflix/RxJava/wiki

This release is a major refactoring of the Hystrix codebase. To assert correctness and performance it was run in production canary servers on the Netflix API several times during development and for over a week during release candidate stages. Prior to this release the 1.3.0.RC1 version has been running in full Netflix API production for several days performing billions of executions a day.

  • Pull 151 Version 1.3 - RxJava Observable Integration
  • Pull 158 Expose current HystrixCommand to fns

Version 1.2.18 (Maven Central)

  • Pull 152 Escape meta-characters to fix dashboard
  • Pull 156 Improve hystrix-clj docs
  • Pull 155 Reset Hystrix after hystrix-clj tests have run

Version 1.2.17 (Maven Central)

  • Pull 138 Eclipse and IDEA Config
  • Pull 141 Upgrade Clojuresque (hystrix-clj builds)
  • Pull 139 Fix dashboard math bug on thread pool rate calculations
  • Pull 149 Allow getFallback to query failure states

Version 1.2.16 (Maven Central)

  • Pull 132 Add with-context macro for conviently wrapping collapsers in thier own context
  • Pull 136 Fixed the mock stream
  • Pull 137 Limit scope of CurrentThreadExecutingCommand

Version 1.2.15 (Maven Central)

This is fixing a bug introduced in the last release that affects semaphore isolated commands that use request caching.

Version 1.2.14 (Maven Central)

  • Issue 116 Mechanism for Auditing Network Access Not Isolated by Hystrix

A new module for instrumenting network access to identify calls not wrapped by Hystrix.

See the module README for more information: https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-network-auditor-agent

Version 1.2.13 (Maven Central)

  • Issue 127 Add destroy() method to MetricsServlet

Version 1.2.12 (Maven Central)

  • Issue 124 NPE if Hystrix.reset() called when it's already shutdown

Version 1.2.11 (Maven Central)

  • Issue 113 IllegalStateException: Future Not Started (on thread pool rejection with response caching)
  • Issue 118 Semaphore counter scope was global instead of per-key
  • Pull 121 Concurrent execution metric for semaphore and thread isolation

Version 1.2.10 (Maven Central)

  • Issue 80 HystrixCollapser Concurrency and Performance Fixes

Version 1.2.9 (Maven Central)

Version 1.2.8 (Maven Central)

  • Issue 102 Hystrix.reset() functionality for clean shutdown and resource cleanup
  • Pull 103 hystrix-clj cleanup
  • Pull 104 javadoc clarification
  • Pull 105 Added IntelliJ IDEA support, cleanup to Eclipse support

Version 1.2.7 (Maven Central)

Version 1.2.6 (Maven Central)

  • Issue 96 Remove 'final' modifiers to allow mocking

Version 1.2.5 (Maven Central)

  • Pull 94 Force character encoding for event stream to utf-8
  • Issue 60 Dashboard: Hover for full name (when shortened with ellipsis)
  • Issue 53 RequestLog: Reduce Chance of Memory Leak

Version 1.2.4 (Maven Central)

  • Pull 91 handle null circuit breaker in HystrixMetricsPoller

Version 1.2.3 (Maven Central)

  • Issue 85 hystrix.stream holds connection open if no metrics
  • Pull 84 include 'provided' dependencies in Eclipse project classpath

Version 1.2.2 (Maven Central)

  • Issue 82 ThreadPool stream should include reportingHosts

Version 1.2.1 (Maven Central)

  • Issue 80 IllegalStateException: Future Not Started
  • Issue 78 Include more info when collapsed requests remain in queue

Version 1.2.0 (Maven Central)

  • Issue 10 HystrixCommand Execution Hooks via Plugin
    • Pull 71 Change Throwable to Exception
    • Pull 71 jettyRun support for running webapps via gradle
  • Issue 15 Property to disable percentile calculations
  • Issue 69 Property to disable fallbacks
  • Pull 73 Make servlet-api a provided dependency
  • Pull 74 Dashboard problem when using Turbine (Stream not flushing)

Version 1.1.7 (Maven Central)

  • Pull 67 Unit tests for request log and checked exceptions
  • Pull 66 Making provided scope transtive
  • Pull 65 Fixed gitignore definition of build output directories
  • Issue 63 Add "throws Exception" to HystrixCommand run() method
  • Pull 62 applying js fixes to threadPool ui
  • Pull 61 Request log with timeouts
  • Issue 55 HysrixRequestLog: Missing Events and Time on Timeouts
  • Issue 20 TotalExecutionTime not tracked on queue()
  • Pull 57 Dashboard js fix
  • Issue 39 HystrixPlugins Bootstrapping Problem - Race Conditions
  • Pull 52 Gradle Build Changes

Version 1.1.6

  • Pull 51 Merging in gradle-template, specifically provided

Version 1.1.5

  • Pull 50 Make javax.servlet-api a 'provided' dependency not 'compile'

Version 1.1.4

  • Pull 49 Cleaner design (for metrics) by injecting listener into constructor.

Version 1.1.3

  • Pull 47 Support pausing/resuming metrics poller
  • Pull 48 Fixing non-deterministic unit test
  • README files added to submodules

Version 1.1.2

Version 1.1.1

  • Issue 24 Yammer Metrics Support
  • Pull 43 Fix the wrong percentile for latencyExecute_percentile_75 in the Servo publisher

Version 1.1.0

  • Pull 32 servo-event-stream module
  • Pull 33 Remove Servo dependency from core, move to submodule
  • Pull 35 Metrics event stream
  • Issue 34 Remove Strategy Injection on HystrixCommand
  • Pull 36 example webapp
  • Pull 37 Migrate metrics stream from org.json.JSONObject to Jackson

Version 1.0.3

  • Pull 4 Contrib request context servlet filters
  • Pull 16 Change logger from info to debug for property changes
  • Issue 12 Use logger.error not logger.debug for fallback failure
  • Issue 8 Capture exception from run() and expose getter
  • Issue 22 Default Collapser scope to REQUEST if using Setter
  • Pull 27 Initialize HealthCounts to non-null value
  • Issue 28 Thread pools lost custom names in opensource refactoring
  • Pull 30 Simplified access to HystrixCommandMetrics
  • Javadoc and README changes

Version 1.0.2

  • Javadoc changes

Version 1.0.0

  • Initial open source release