Skip to content

Releases: reactor/reactor-core

v3.2.3.RELEASE

23 Nov 09:43
Compare
Choose a tag to compare

This is the 4th release of Reactor 3.2, part of Californium-SR3 Release Train.

This is a recommended update for all Reactor 3.2 users.

⚠️ Update considerations and deprecations

  • ✨ Add ability to multi-decorate backing ExecutorServices (#1408, #1409)
    • This replaces the Factory method that is now deprecated (but applied as the last decorator)
    • Decorators are keyed by a String, allowing for easy identification and removal of specific decorators and good behavior when multiple libraries need to install a decorator
  • 🐞 Mono.fromFuture/Mono.fromCompletionStage now correctly detects when the future is completed AFTER the Mono has been cancelled (#1414)
    • Any value is ignored by this point. Exceptions are still propagated except CancellationException
    • The later means that one can also safely cancel the source Future itself in a doOnCancel

✨ New features and improvements

  • StepVerifier now provides more details on unexpected termination during no-event (#1440)
  • Reactor-provided Scheduler backed by an ExecutorService can now be instrumented with Micrometer (#1201)
  • The Schedulers.enableMetrics() method enables this
  • Only state of the executor (number of tasks in the queue for instance) is instrumented for now, not duration of the tasks.
  • Custom-made Scheduler implementations can apply the same decorator (and any registered decorator) via the new Schedulers.decorateExecutorService method
  • Make expectAccessibleContext work with initialContext from StepVerifier when just asserting a scalar source without operators (#1417)

🪲 Bug fixes

  • Disposed worker also rejects scheduling a 0-period task (#1411)
  • Ensure METER_FLOW_DURATION always have exception tag (would otherwise break assumptions of a few instrumentation providers) (#1425)
  • Fixed request accounting in onBackpressureLatest (#1430)

📖 Documentation, Tests and Build

  • Various documentation typos have been fixed (#1420, #1419, #1424, #1427,
  • The wording about guarantees enforced by the Scheduler#createWorker interface has been clarified not to always include ordering (#1421)
  • [test] Attempt to fix flaky test distinctUntilChanged*DoesntRetainObjects (#1428)
  • [test] Better evaluation of bufferWhen cancel/drain race (c5a93be)

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

@nurkiewicz @lerencao @pranavek @quaff @OlegDokuka

v3.1.12.RELEASE

22 Nov 16:12
Compare
Choose a tag to compare

This is the 13th release of Reactor 3.1, part of Bismuth-SR14 Release Train.

This is a recommended update for all Reactor 3.1 users.

✨ New features and improvements

  • Make expectAccessibleContext work with initialContext from StepVerifier (#1417)
  • Even though this method aims at checking was is readable in the context, if there is no chain of operators and the Publisher is just a source one, then StepVerifier now ties back to the Context provided in the options.

🪲 Bug fixes

  • Fix request accounting in onBackpressureLatest (#1430)

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

@OlegDokuka

v3.2.2.RELEASE

31 Oct 16:44
Compare
Choose a tag to compare

This is the 3rd release of Reactor 3.2, part of Californium-SR2 Release Train.

This maintenance release contains a few bugfixes, as well as minor improvements.

✨ New features and improvements

  • TestPublisher now actually supports Violation.DEFER_CANCELLATION (#1406)
  • Add onDiscard support to reduce, prevent value retention in scan (#1394)
  • (internal) have MonoReduce rely on super.value, null it out in complete (#1410)

🪲 Bug fixes

  • Using metrics() without Micrometer triggers NoClassDefFoundError, now fixed (#1383)
  • the following fixes have been forwarded from the 3.1.11.RELEASE branch:
  • Fixed share() and .publish().refCount() (including one with grace period) missing repeat/retry re-subscribes (#1385, #1386)
  • Fixed reduce() lambda sometimes being passed a null value, potentially causing NPE (#1393)
  • Fixed a NullPointerException in loggers' format other than SLF4J (#1403)

📖 Documentation, Tests and Build

  • Fixed various javadoc and comment typos (#1402)
  • Avoid finalize in test by introducing PhantomReference-based tracker in new MemoryUtils (#1407)
  • Travis CI alternative build is now on JDK11 (implying various build dependency bumps, #1407)
  • *Staticinit tests won't prevent re-running failed test in IDE anymore

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

@philleonard, @zhouzhou19950825

v3.1.11.RELEASE

31 Oct 16:35
Compare
Choose a tag to compare

This is the 12th release of Reactor 3.1, part of Bismuth-SR13 Release Train.

This maintenance release contains a few bugfixes.

🪲 Bug fixes

  • Fixed share() and .publish().refCount() (including one with grace period) missing repeat/retry re-subscribes (#1385, #1386)
  • Fixed reduce() lambda sometimes being passed a null value, potentially causing NPE (#1393)
  • Fixed a NullPointerException in loggers' format other than SLF4J (#1403)

v3.2.1.RELEASE

10 Oct 16:03
Compare
Choose a tag to compare

This is the second release of Reactor 3.2, part of Californium-SR1 Release Train.

This release contains a couple of small bugfixes, recommended for all 3.2 users, as well as several minor improvements to the javadoc/reference documentation.

⚠️ Update considerations and deprecations

  • The repository folder hierarchy has changed so that the root for all things documentation are at /docs/, not /src (#1360, f0fd559)

🪲 Bug fixes

  • EmitterProcessor SYNC fusion completing too early, not producing an element when fused (#1364)
  • Fixed a CombineLatest ClassCastException with single source(#1356)

📖 Documentation, Tests and Build

  • The reference documentation now embeds HighlightJS, which allows for snippets to be highlighted in the HTML5 version (#1360, 4136dd5)
  • Running retry-elapsed snippet from reference doc had results inconsistent with output that was shown in doc (#1374)
  • The imperative example of "catch-and-rethrow" pattern in the error handling section didn't actually show a re-throw behavior (#1373)
  • Several snippets from the reference documentation contained minor mistakes or inconsistencies with their description (#1366, #1361, #1359, #1378, #1358)

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

@nurkiewicz, @pgilad, @romangr

v3.1.10.RELEASE

10 Oct 15:46
Compare
Choose a tag to compare

This is the 13th release of Reactor 3.1, part of Bismuth-SR12 Release Train.

This release is a small bugfix release, recommended for all 3.1.x users.

🪲 Bug fixes

  • EmitterProcessor SYNC fusion completing too early, not producing an element when fused (#1364)
  • Fixed a CombineLatest ClassCastException with single source(#1356)

📖 Documentation, Tests and Build

  • Running retry-elapsed snippet from reference doc had results inconsistent with output that was shown in doc (#1374)

v3.2.0.RELEASE

21 Sep 12:45
Compare
Choose a tag to compare

This is the first release of Reactor 3.2, part of the Californium-RELEASE Release Train.

This major release contains a few significant new features, in addition to a heap of improvements and bug fixes.

⚠️ Update considerations and deprecations

  • Compared to 3.1.x, the Scannable#operatorName() method has been renamed to stepName() (#1156)
  • Disposables.composite() now has list semantics rather than undocumented set semantics, and thus should be more performant (#1237)
  • The constant Schedulers.DEFAULT_POOL_SIZE is now used internally (notably by Schedulers.[new]parallel()), but unlike before it doesn't enforce a minimum of 4 anymore. It can be tuned via system property reactor.schedulers.defaultPoolSize now though (#1243, #1246)
  • repeat(N) is now aligned with retry(N), as well as repeat(N, Predicate)/retry(N, Predicate): the number indicates the amount of repetitions of the original sequence, ie 0 mirrors the original sequence while 1 mirrors the original sequence + an additional repetition of it. Negative values are rejected at assembly time. (#1252)
    • look out for usage of repeat(long) in your code and decrement the passed parameter by one
    • repeat(0) should be replaced with Flux/Mono.empty()
  • windowUntil and windowWhile don't have a final empty window at the end of the sequence (#1033)
  • Default behavior for Operators.onErrorDropped is now to both bubble and throw the error
    • Mono.fromCompletionStage now drops fatal exceptions rather than hanging (#1118)
  • Blocking APIs (like blockLast(), block(), iterator()) called inside a parallel or single Scheduler trigger an exception (#1102)
    • This kind of blocking call are harmful as they impact limited resources, with a high risk of freezing the application
  • concatMapDelayError default behavior is now to delay the errors until the END (#1101)
    • This aligns with other *DelayError operators
  • StepVerifier.withVirtualTime now use a global lock, making virtual time verifications mutually exclusive (#648)
    • Virtual time impacts schedulers at the application level. Parallelisation of tests could lead to unforeseen side effects due to this (initializing operators with a VTS and have the StepVerifier see and manipulate the wrong VTS)
  • create uses Operators.onOperatorError hook instead of onErrorDropped (#1078)
  • (deprecation) Scannable#operatorName() is deprecated in favor of stepName() (#1115, #1140)
  • (internal) Switch to a simplified implementation for Mono.publish(Function) (#437)
  • (internal) Simplify MonoProcessor internals in preparation for #1114 and further 3.2 changes

⭐ Release focus features

  • Add metrics() to Flux (#1183, #1123, 34e0d4b, #1245, #1242, #1250)
    • This operator does nothing if Micrometer is not on the classpath
    • It exposes metrics from upstream signals visible at the operator's position in the chain
  • Add exponential backoff retry with jitter to core: retryWithBackoff (#1122)
    • This version of retry reflects what we think is the industry best practice in terms of retries.
    • It is a good middle ground between the too simple retry(n), the complex retryWhen(Function) and the more configurable RetryFunction from reactor-addons
  • New operators for transactional reactive use cases: usingWhen (#1220, b87ea6d, #1233, #1259)
    • Like using, but the resource is provided asynchronously through a Publisher
    • Can have separate async "cleanup" for complete, error and cancel terminations
    • Cleanups are asynchronous as well (Function<Resource, Publisher>) and only delay the propagation of the terminal signals, NOT the onNext signals.
    • Cancelled early before the resource is emitted, the Publisher<Resource> itself is cancelled.
  • New doOnDiscard(Class, Consumer) operator (#999, #1343, #1345, #1347)
  • Installs a local Context hook that will let upstream operators in the chain clean up elements that get either filtered out of the downstream sequence or prefetched then discarded
  • New onErrorContinue() mode that influences the upstream chain of operator (#629)
    • Supporting operators up in the chain will request more from their source in case of error, instead of terminating the sequence.
    • The Throwable is passed to a handler instead of downstream.

✨ New features and improvements

  • Include sequence name in timeout()'s message (#1349)
  • Replace String.replaceAll with a static Pattern and Matcher.replaceAll in Scannable (#1315)
  • Added a way to strictly limit the rate of requests with limitRate(n, 0) (#1317)
    • previously the lowTide and highTide parameter could still be changed by internal prefetching strategies
    • now with a lowTide of 0, the requests will strictly adhere to highTide
  • Blocking code detection and rejection has been improved for toStream() and toIterable(), and now only reject when the iteration is performed (#1313)
    • it would previously reject right where the Iterable was materialized, but what actually blocks is the act of iterating.
  • Improve concat error message on null Publisher (#1321)
  • Calling Mono.from(Flux.from(mono)) is now immediately returning the mono instance, as this is conceptually a no-op. (#1329)
    • the inverse operation (Flux.from(Mono.from(flux))) is NOT a no-op as it transforms the original Flux into a Mono, so it still returns a different instance.
  • Use more descriptive parameter names for buffer durations (#1331)
  • The default Scheduler pool size is now configurable via a system property (#1243)
  • In the case where a QueueSubscription is logged via log() during an onNext, its toString method is explicitly called (#1270)
    • typically this would happen when using window() immediately followed by log(), which is not really useful but was even less useful since it would trigger an exception
  • Tuple2..Tuple8 now have mapT1..mapT8 (as relevant) methods that allow to change a single part of the Tuple (e4a9aee, discussed in #1058)
  • cache(Duration) now have an overload that takes a Scheduler, added Mono.cache TTL-generator variant (#1189, #1125)
  • Operators.lift now has an alternative that exposes the raw Publisher: liftPublisher and supports Fuseable (#1205, #1206)
  • Added zip variants with 7 and 8 arguments (#1210
  • Support 0 delay/period in Flux.interval (#1178)
  • Add immutable empty() queue Supplier to Queues, support empty and one cases in Queues.capacity() (#1161, d9d76ab)
  • doOnEach now support Fuseable and ConditionalSubscriber (#1003)
  • Flux.take(0) now eagerly cancels on subscription (#1158)
  • Lazy Mono#fromFuture and Mono#fromCompletionStage added, with Supplier param (#1131)
  • Add an error(Supplier) variant to Flux and Mono (#1100)
  • Add Scannable#steps(), which produces a Stream<String> of all the stepNames both upstream and downstream (including the current Scannable) (#1115, #1140)
  • All operators now implement basic Scannable (this avoids problems for users that use instanceof checks in hooks, #1136)
  • [kotlin] Add Flux.split extension to convert Flux<List<T>> to Flux<T> (#1089)
  • [reactor-test] Add verifyThenAssertThat(Duration) to allow assertions and verification timeout (#1124)
  • [reactor-test] Allow naming of a whole StepVerifier scenario through options (#1077)
  • [reactor-test] Allow to change the LoggerFactory with a custom implementation, provide a TestLogger one that can be used to assert log contents (8f3a8fa)
  • [reactor-test] Add a cold version of the TestPublisher than can be set up before eg. subscribing in a StepVerifier (#1236)

🪲 Bug fixes

  • Fix ClassCastException in OneQueue/ZeroQueue + Java9 build (#1326)
  • When using doOnSuccess and subscribing without an error handler, errors would be swallowed (#1337)
    • This now generates a ErrorCallbackNotImplemented exception like in other cases, unless a doOnTerminate is also used
    • The best practice is still to always define an error handler when using subscribe(...)
  • Fixed an ArrayIndexOutOfBoundsException when using lift with a ParallelFlux operator that is fuseable (can be triggered by using Sleuth, #1293)
  • FluxPublish should trigger an extra poll on sync fusion (#1290, #1291)
  • Request fusion with THREAD_BARRIER in concatMap* and publish (#1302)
  • When using a non-compliant TestPublisher, calling .mono() would turn it into a compliant one. This has been fixed and the mono will now continue to be a bad boy (#1244)
  • A few bufferTimeout and bufferWhen issues have been corrected around cancellation and drain race conditions (#1247)
  • Flux.last() now correctly throws a NoSuchElementException on empty source even when said source is a Callable Mono(#1226)
  • delayUntil correctly request Long.MAX_VALUE and not Integer.MAX_VALUE on subscribe (#1214)
  • Operators.lift() properly maintain GroupedFlux/ConnectableFlux interfaces (#1204)
  • Request is now accounted for in `FluxOnBackpressureBufferTimeout (#1194)
  • onSubscribe should be done before add in MonoCacheTime.subscribe (#1190)
  • Multi-subscriber operators Context resolution resolves to 1st context (#1114)
  • Fix dangling thread when calling WorkQueueProcessor.forceShutdown (#1142)
  • Let VirtualTimeScheduler defer advanceTime if queue is empty (#783)
    • This avoids a situation where, due to a subscribeOn, the operators delaying values end up reading the clock AFTER the virtual time has been moved forward by thenAwait, hanging the test.
  • Tweak FluxPublish dispose to clear the existing connection (#1173)
  • Avoid interrupting WorkerTask Future if cancelled race (#1107)
  • FluxRefCount DisconnectException on cancellation race (#...
Read more

v3.2.0.RC1

12 Sep 14:56
Compare
Choose a tag to compare
v3.2.0.RC1 Pre-release
Pre-release

This is the 5th pre-release (first release candidate) of Reactor 3.2, part of Californium-RC1 Release Train.

⚠️ Update considerations and deprecations

✨ New features and improvements

  • Replace String.replaceAll with a static Pattern and Matcher.replaceAll in Scannable (#1315)
  • Added a way to strictly limit the rate of requests with limitRate(n, 0) (#1317)
    • previously the lowTide and highTide parameter could still be changed by internal prefetching strategies
    • now with a lowTide of 0, the requests will strictly adhere to highTide
  • Blocking code detection and rejection has been improved for toStream() and toIterable(), and now only reject when the iteration is performed (#1313)
    • it would previously reject right where the Iterable was materialized, but what actually blocks is the act of iterating.
  • Improve concat error message on null Publisher (#1321)
  • Calling Mono.from(Flux.from(mono)) is now immediately returning the mono instance, as this is conceptually a no-op. (#1329)
    • the inverse operation (Flux.from(Mono.from(flux))) is NOT a no-op as it transforms the original Flux into a Mono, so it still returns a different instance.
  • Use more descriptive parameter names for buffer durations (#1331)

🪲 Bug fixes

  • Fix ClassCastException in OneQueue/ZeroQueue + Java9 build (#1326)
  • When using doOnSuccess and subscribing without an error handler, errors would be swallowed (#1337)
    • This now generates a ErrorCallbackNotImplemented exception like in other cases, unless a doOnTerminate is also used
    • The best practice is still to always define an error handler when using subscribe(...)

📖 Documentation, Tests and Build

  • [doc] Point between Flux#create and Flux#push, show multithreading diff (3834537)
  • [doc] The reference documentation has been extensively reviewed and revised for 3.2 (#1325)
  • [test] Do not fail HooksTestStaticInit test in IDE (#1322)
  • [build] Add LGTM.com code quality badges (#1339)

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

@nurkiewicz, @pdudkiewicz, @szpak, @xcorail

v3.1.9.RELEASE

12 Sep 14:27
Compare
Choose a tag to compare

This is the 10th release of Reactor 3.1, part of BISMUTH-SR11 Release Train.

This is a recommended update for all Reactor 3.1 users.

✨ New features and improvements

  • Avoid logging QueueSubscription objects as collections in log()'s onNext (#1270)
  • Blocking code detection and rejection has been improved for toStream() and toIterable(), and now only reject when the iteration is performed (#1313)
    • it would previously reject right where the Iterable was materialized, but what actually blocks is the act of iterating.
  • Calling Mono.from(Flux.from(mono)) is now immediately returning the mono instance, as this is conceptually a no-op. (#1329)
    • the inverse operation (Flux.from(Mono.from(flux))) is NOT a no-op as it transforms the original Flux into a Mono, so it still returns a different instance.

🪲 Bug fixes

  • Address multiple bufferTimeout and bufferWhen issues (#1247)
  • Fix a race condition on refCount quick subscribe-and-cancel (#1260)
  • Flux#publish and EmitterProcessor should trigger an extra poll during sync fusion (#1290)
  • ParallelFlux, when decorated through lift() (eg. by instrumenting using Sleuth), would throw an IndexOutOfBoundsException (#1293)
  • Flux#publish, concatMap* could run on the wrong Scheduler when fused (#1302)
  • When using doOnSuccess and subscribing without an error handler, errors would be swallowed (#1337)
    • This now generates a ErrorCallbackNotImplemented exception like in other cases, unless a doOnTerminate is also used
    • The best practice is still to always define an error handler when using subscribe(...)

📖 Documentation, Tests and Build

  • [build] Smarter tests on 3.1 maintenance branch (87944b3, 87944b3)
  • [build] Reactivate JDK9 Travis builds (2b4bf5e, 209a45f, #896)
  • [doc] Improved documentation of create (#1266)
  • [doc] Fixed an issue in some reference doc error handling snippets (#1269)
  • [deps] Bump Kotlin to 1.2.51 (#1274)

v3.2.0.M4

14 Aug 13:13
Compare
Choose a tag to compare
v3.2.0.M4 Pre-release
Pre-release

This is the 4th milestone of Reactor 3.2, part of Californium-M2 Release Train.

This is a recommended update for all Reactor 3 users.

⚠️ Update considerations and deprecations

  • Compared to previous 3.2 milestones, Flux#onErrorContinue() and Flux#onErrorContinue(Predicate) have been removed. This avoids encouraging these variants, which would rely on the customization of Hooks (or otherwise still fail the sequence, defeating the point of the operator). Use the variants with a BiConsumer to explicitly indicate what to do with the error. (#1305, #1311)
  • Compared to 3.1.x, the Scannable#operatorName() method has been renamed to stepName() (#1156)
  • Have a look at previous release notes (M1, M2 and M3) for complete update considerations from 3.1.x
  • Disposables.composite() now has list semantics rather than undocumented set semantics, and thus should be more performant (#1237)

🪲 Bug fixes

  • Fixed an ArrayIndexOutOfBoundsException when using lift with a ParallelFlux operator that is fuseable (can be triggered by using Sleuth, #1293)
  • FluxPublish should trigger an extra poll on sync fusion (#1290, #1291)
  • Request fusion with THREAD_BARRIER in concatMap* and publish (#1302)

📖 Documentation, Tests and Build

  • [doc] Fixed a typo (#1294)
  • [test] Added unit test for SpscArrayQueue (35519ab)

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

@genie-youn, @MarkusJais