Releases: reactor/reactor-core
v3.2.3.RELEASE
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
- This replaces the
- 🐞
Mono.fromFuture
/Mono.fromCompletionStage
now correctly detects when the future is completed AFTER theMono
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 adoOnCancel
- Any value is ignored by this point. Exceptions are still propagated except
✨ New features and improvements
- StepVerifier now provides more details on unexpected termination during no-event (#1440)
- Reactor-provided
Scheduler
backed by anExecutorService
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 newSchedulers.decorateExecutorService
method - Make
expectAccessibleContext
work withinitialContext
fromStepVerifier
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
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 withinitialContext
fromStepVerifier
(#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 theContext
provided in the options.
🪲 Bug fixes
- Fix request accounting in onBackpressureLatest (#1430)
👍 Thanks to the following contributors that also participated to this release
v3.2.2.RELEASE
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 inscan
(#1394) - (internal) have
MonoReduce
rely onsuper.value
, null it out in complete (#1410)
🪲 Bug fixes
- Using
metrics()
without Micrometer triggersNoClassDefFoundError
, 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 anull
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 introducingPhantomReference
-based tracker in newMemoryUtils
(#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
v3.1.11.RELEASE
This is the 12th release of Reactor 3.1, part of Bismuth-SR13
Release Train.
This maintenance release contains a few bugfixes.
🪲 Bug fixes
v3.2.1.RELEASE
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
v3.1.10.RELEASE
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
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
, theScannable#operatorName()
method has been renamed tostepName()
(#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 bySchedulers.[new]parallel()
), but unlike before it doesn't enforce a minimum of4
anymore. It can be tuned via system propertyreactor.schedulers.defaultPoolSize
now though (#1243, #1246) repeat(N)
is now aligned withretry(N)
, as well asrepeat(N, Predicate)
/retry(N, Predicate)
: the number indicates the amount of repetitions of the original sequence, ie0
mirrors the original sequence while1
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 withFlux/Mono.empty()
- look out for usage of
windowUntil
andwindowWhile
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 errorMono.fromCompletionStage
now drops fatal exceptions rather than hanging (#1118)
- Blocking APIs (like
blockLast()
,block()
,iterator()
) called inside a parallel or singleScheduler
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 theEND
(#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
usesOperators.onOperatorError
hook instead ofonErrorDropped
(#1078)- (deprecation)
Scannable#operatorName()
is deprecated in favor ofstepName()
(#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()
toFlux
(#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
- This operator does nothing if
- 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 complexretryWhen(Function)
and the more configurableRetryFunction
fromreactor-addons
- New operators for transactional reactive use cases:
usingWhen
(#1220, b87ea6d, #1233, #1259)- Like
using
, but the resource is provided asynchronously through aPublisher
- 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 theonNext
signals. - Cancelled early before the resource is emitted, the
Publisher<Resource>
itself is cancelled.
- Like
- 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 staticPattern
andMatcher.replaceAll
inScannable
(#1315) - Added a way to strictly limit the rate of requests with
limitRate(n, 0)
(#1317)- previously the
lowTide
andhighTide
parameter could still be changed by internal prefetching strategies - now with a
lowTide
of 0, the requests will strictly adhere tohighTide
- previously the
- Blocking code detection and rejection has been improved for
toStream()
andtoIterable()
, 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.
- it would previously reject right where the
- Improve concat error message on null Publisher (#1321)
- Calling
Mono.from(Flux.from(mono))
is now immediately returning themono
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 originalFlux
into aMono
, so it still returns a different instance.
- the inverse operation (
- 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 vialog()
during anonNext
, itstoString
method is explicitly called (#1270)- typically this would happen when using
window()
immediately followed bylog()
, which is not really useful but was even less useful since it would trigger an exception
- typically this would happen when using
Tuple2
..Tuple8
now havemapT1
..mapT8
(as relevant) methods that allow to change a single part of theTuple
(e4a9aee, discussed in #1058)cache(Duration)
now have an overload that takes aScheduler
, addedMono.cache
TTL-generator variant (#1189, #1125)Operators.lift
now has an alternative that exposes the rawPublisher
:liftPublisher
and supportsFuseable
(#1205, #1206)- Added
zip
variants with 7 and 8 arguments (#1210 - Support 0 delay/period in
Flux.interval
(#1178) - Add immutable
empty()
queue Supplier toQueues
, support empty and one cases inQueues.capacity()
(#1161, d9d76ab) doOnEach
now supportFuseable
andConditionalSubscriber
(#1003)Flux.take(0)
now eagerly cancels on subscription (#1158)- Lazy
Mono#fromFuture
andMono#fromCompletionStage
added, withSupplier
param (#1131) - Add an
error(Supplier)
variant to Flux and Mono (#1100) - Add
Scannable#steps()
, which produces aStream<String>
of all the stepNames both upstream and downstream (including the currentScannable
) (#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 convertFlux<List<T>>
toFlux<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 aTestLogger
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 aStepVerifier
(#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 adoOnTerminate
is also used - The best practice is still to always define an error handler when using
subscribe(...)
- This now generates a
- Fixed an
ArrayIndexOutOfBoundsException
when usinglift
with aParallelFlux
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
andbufferWhen
issues have been corrected around cancellation and drain race conditions (#1247) Flux.last()
now correctly throws aNoSuchElementException
on empty source even when said source is aCallable Mono
(#1226)delayUntil
correctly requestLong.MAX_VALUE
and notInteger.MAX_VALUE
on subscribe (#1214)Operators.lift()
properly maintainGroupedFlux
/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
deferadvanceTime
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 bythenAwait
, hanging the test.
- This avoids a situation where, due to a
- Tweak
FluxPublish
dispose to clear the existing connection (#1173) - Avoid interrupting
WorkerTask
Future
if cancelled race (#1107) FluxRefCount
DisconnectException
on cancellation race (#...
v3.2.0.RC1
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 staticPattern
andMatcher.replaceAll
inScannable
(#1315) - Added a way to strictly limit the rate of requests with
limitRate(n, 0)
(#1317)- previously the
lowTide
andhighTide
parameter could still be changed by internal prefetching strategies - now with a
lowTide
of 0, the requests will strictly adhere tohighTide
- previously the
- Blocking code detection and rejection has been improved for
toStream()
andtoIterable()
, 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.
- it would previously reject right where the
- Improve concat error message on null Publisher (#1321)
- Calling
Mono.from(Flux.from(mono))
is now immediately returning themono
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 originalFlux
into aMono
, so it still returns a different instance.
- the inverse operation (
- 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 adoOnTerminate
is also used - The best practice is still to always define an error handler when using
subscribe(...)
- This now generates a
📖 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
v3.1.9.RELEASE
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 inlog()
'sonNext
(#1270) - Blocking code detection and rejection has been improved for
toStream()
andtoIterable()
, 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.
- it would previously reject right where the
- Calling
Mono.from(Flux.from(mono))
is now immediately returning themono
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 originalFlux
into aMono
, so it still returns a different instance.
- the inverse operation (
🪲 Bug fixes
- Address multiple
bufferTimeout
andbufferWhen
issues (#1247) - Fix a race condition on
refCount
quick subscribe-and-cancel (#1260) Flux#publish
andEmitterProcessor
should trigger an extra poll during sync fusion (#1290)ParallelFlux
, when decorated throughlift()
(eg. by instrumenting using Sleuth), would throw anIndexOutOfBoundsException
(#1293)Flux#publish
,concatMap*
could run on the wrongScheduler
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 adoOnTerminate
is also used - The best practice is still to always define an error handler when using
subscribe(...)
- This now generates a
📖 Documentation, Tests and Build
v3.2.0.M4
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()
andFlux#onErrorContinue(Predicate)
have been removed. This avoids encouraging these variants, which would rely on the customization ofHooks
(or otherwise still fail the sequence, defeating the point of the operator). Use the variants with aBiConsumer
to explicitly indicate what to do with the error. (#1305, #1311) - Compared to
3.1.x
, theScannable#operatorName()
method has been renamed tostepName()
(#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 usinglift
with aParallelFlux
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)