Skip to content

@simonbasle simonbasle released this Feb 10, 2017 · 1177 commits to master since this release

This is the 5th release of Reactor 3.0, part of Aluminium-SR1 Release Train.

This is a recommended update for all Reactor 3 users, with a lot of improvements
and small bugfixes that have notably been made possible thanks to an ongoing effort
to improve the test coverage beyond 80%.

⚠️ Update considerations and deprecations

  • A number of APIs and signatures have been deprecated and are scheduled to be removed in 3.1.0.
    This should be made explicit in the associated API javadoc, but a list has been compiled in #323 too.
  • Some variants of window/buffer/windowMillis/bufferMillis were ambiguous (having close variations
    of numerical parameters, int+long or long+long). The int+long ones (max size plus a timeout) have been
    renamed with a Timeout keyword, like windowTimeoutMillis (#363) (alias and deprecate)
  • RejectedDisposable was not intended to be public and has been made package-private (#362)
  • All closed API Supplier<Queue> checks for null have been replaced with an error throw, as they are consider fatal
  • Deprecate Operators.addAndGet(AtomicLong) as not used internally, we encourage to use the other addAndGet variant or if required port this over your app/lib.
    • Exceptions.failWithCancel() is not a singleton exception anymore and Exceptions.CANCEL_STACKTRACE has been deprecated.

New features and improvements

  • Tuples improvements: they are now Iterator<Object> with an unmodifiable iterator, a Tuple2 and a Tuple3
    filled with nulls won't have the same hashcode anymore (base is the size), and Tuples toString format changed
    (displays nulls, enclosed in square brackets)
  • Added decorator hook for ExecutorServices in Schedulers, allowing users to change the internal implementation
    for any core-provided Scheduler (#354)
  • Mono and ParallelFlux now have doOnEach (#344)
  • ParallelFlux now allow you to easily compose on each group's flux using composeGroup (#283)
  • Generalize fromFuture with an additonal fromCompletionStage to support more future-like use cases (#357)
  • Align delay APIs that delays elements on Mono and Flux by adding Mono.delayElement and prepare renaming
    of Flux.delay to Flux.delayElements (#263)
  • Expose groupBy with prefetch variant (#370)
  • In the same vein as for buffer, two new window operators have been introduced: windowUntil and windowWhile (#260)
  • Improvements have been made to debugging and tracing user experience (#379, #361, #417)
    • identifying the source of an error from an inner flux inside eg. a flatMap, decrease performance cost of activated assembly tracing, added Flux, Mono, ParallelFlux checkpoint(description?) operator to manually apply assembly tracing
  • Direct schedule Disposable can now be checked for isDisposed() (#410)
  • Add transform() to onAssembly scope
  • Fuseable.QueueSubscription#isEmpty() is not expected to fail anymore
  • Do not wrap rejected execution exceptions (use Exceptions.propagate() instead of Exceptions.bubble()
  • Check negative timeout for Schedulers.newElastic()
  • Check bufferSize in Flux#onBackpressureBuffer()
  • Eager cancel Flux.publish subscribers during batch of emission (#430)

🐞 Reported Bug fixes

  • Fix Mono.sequenceEquals not propagating subscribe signal + doing too much inner subscribe / too few inner cancel (#328, #329)
  • Mono.whenDelayError was wrongly only using last 2 params out of 3 (#333)
  • Fix WorkQueueProcessor potential thread leak (#335, #336)
  • Tuples and Tuple2 fixes: fixed Tuples.fromArray for size 0 and 8, (#338)
  • Due to the Tuples issue above, the zipWith was failing with less than 8 sources (#338)
  • MonoSink.success(null) now delegates to success() to ensure same semantics (#346)
  • CachedTimedScheduler.now() correctly delegates to underlying scheduler (#351)
  • Operators.addAndGet now return updated value (#372)
  • An unbounded prefetch (Integer.MAX_VALUE) on groupBy triggers unbounded request (#385)
  • Fix fusion on Flux.skipUntil, Flux.handle, fix fusion request handling for SubscribeOnValue (8f67283, f2404eb, #342)
    • Fix unbounded Flux.replay/cache fusion (#392)
  • Use unbounded queues for groupBy, window, buffer and switchMap to avoid overflow (#411)
  • Thread boundaries such as zip, flatMap or publishOn now correctly request fusion with the thread barrier flag. This means that thread expectation for upstream operators such as doOnNext or map will defeat tentative to fuse to enforce thread expectations.
  • Fix Flux & ParallelFlux reduce/collect generic issue
  • Fix linked queue minimum (was always minimum instead of the default size QueueSupplier.SMALL_BUFFER_SIZE or specified by user via QueueSupplier.unbounded(linkSize) !)
  • Fix bi-insert logic used by switchMap/join

📖 Documentation, Tests and Build

  • Various typos and wording improvements to javadocs
  • First draft of a Reference Guide (#404, with a target at spring-level quality and completion for 3.1.0)
  • Global effort on tests: increase overall coverage, better separate long-running tests that make less sense in CI,
    first shot at a TCK-like framework to ease coverage of new operators...
  • Exclude snapshot and mavenLocal from release builds (#291)

Various changes and fixes

  • Use computeIfAbsent instead of verbose null check in collectMultimap (#396)
  • OSGi bundle: don't import com.google twice (#386)
  • Introduce progressive upgrade to unbounded request FlatMap in preparation of #371
  • Fix ParallelFlux#getPrefetch accuracy of the returned value
  • Fix Mono.or optimization, add assembly on Mono.first
  • Fix Mono.when array type issue
  • Hooks (de)activation are now logged as DEBUG instead of INFO
  • Improve common operator defensive patterns regarding fusion and RS rules
  • Fuseable.SynchronousSubscription does now expect a sync request mode and will return Fuseable.NONE if requested NONE.
  • Internal renaming, in particular ParallelUnordered to Parallel
  • Remove instance cost where possible for ArrayDeque operators
  • unbounded prefetch should now correctly return Integer.MAX_VALUE not Long.MAX_VALUE on Flux#getPrefetch(), monitor #397 for the complete migration in 3.1

👍 Thanks to the following contributors that also participated to this release

@kamilszymanski, @magnet, @mrorii, @sinwe, @dfeist and all folks who came discussing in our Gitter room, Spring team for continuous extensive collaboration and @akarnokd for his usual wisdom.

Assets 2
You can’t perform that action at this time.