github reactor/reactor-core v3.2.0.M3

latest releases: v3.8.5, v3.7.18, v3.8.4...
pre-release7 years ago

This is the 3rd milestone of Reactor 3.2.0, part of Californium-M1 Pre-Release Train.

This milestone contains quite a few bugfixes and improvements, but the main highlight is the introduction of a hook for cleanup of elements that either get filtered out of a sequence or are accumulated by prefetch mechanisms but never emitted (due to cancellation or error).
See #999 for discussion around this topic, feedback is welcome!

Another notable change, this time in the way we work with the repository and contributions that make sense for maintenance releases: as of commit 0d8e16e, there will be no more port #xxx backport commits in maintenance branches, but rather issues will be fixed first in the maintenance branch THEN a forward-merge will happen to include the fix in the master branch. See #1225.

⚠️ Update considerations and deprecations

  • 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()
  • errorStrategyContinue() methods from M1 have been renamed to onErrorContinue to reuse the same prefix as other error handling methods, event though this one has a mechanism that is quite different (#1287)
  • Flux#metrics() from M2 has been refined, and some tags renamed (#1245, #1242, #1250)

✨ New features and improvements

  • ⭐ Add onDiscard hook for clean disposal of elements that never make it to user code (#999)
  • The default Scheduler pool size is now configurable via a system property (#1243)
  • Flux#metrics() from M2 has been refined, and some tags renamed (#1245, #1242, #1250)
  • 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)
  • usingWhen from M2 can now be cancelled early before the resource Publisher emitted, which cancels said Publisher. As a consequence this operator doesn't implement micro-fusion anymore (#1233)

🪲 Bug fixes

  • 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)
  • The usingWhen operator from M2 wouldn't propagate the main sequence's Context to commit/rollback Publishers (#1259)

📖 Documentation, Tests and Build

  • Contributing Guidelines have been totally reworked and reflect the new organisation, notably in terms of labels and branching (see highlights at the top, d166557, #1225)
  • Various clarifications have been made in the javadoc, including marble diagram fixes (#1240, #1266, #1079)
  • Some reference documentation error fallback snippets were wrong (#1269)
  • Java 9 build has been fully reactivated now that every build component is Java 9 compatible (right on time for Java 9 EoL 😁 see 2b4bf5e, 209a45f, #896, e239d65)
  • Kotlin has been bumped to 1.2.51 (#1274)

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

@madgnome, @MarkusJais, @smiklos

Don't miss a new reactor-core release

NewReleases is sending notifications on new releases.