Deprecate auto-fusing setting #22431
This commit is contained in:
parent
740c68873c
commit
60d918c490
7 changed files with 19 additions and 2 deletions
|
|
@ -283,7 +283,7 @@ the :class:`CompletionStage<Sink>` part, and wraps the other two values in a cus
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The nested structure in the above example is not necessary for combining the materialized values, it just
|
The nested structure in the above example is not necessary for combining the materialized values, it just
|
||||||
demonstrates how the two features work together. See :ref:`flow-combine-mat-java` for further examples
|
demonstrates how the two features work together. See :ref:`operator-fusion-java` for further examples
|
||||||
of combining materialized values without nesting and hierarchy involved.
|
of combining materialized values without nesting and hierarchy involved.
|
||||||
|
|
||||||
Attributes
|
Attributes
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ which will be running on the thread pools they have been configured to run on -
|
||||||
Reusing *instances* of linear computation stages (Source, Sink, Flow) inside composite Graphs is legal,
|
Reusing *instances* of linear computation stages (Source, Sink, Flow) inside composite Graphs is legal,
|
||||||
yet will materialize that stage multiple times.
|
yet will materialize that stage multiple times.
|
||||||
|
|
||||||
.. _flow-combine-mat-java:
|
.. _operator-fusion-java:
|
||||||
|
|
||||||
Operator Fusion
|
Operator Fusion
|
||||||
---------------
|
---------------
|
||||||
|
|
|
||||||
|
|
@ -316,6 +316,15 @@ In 2.4 an explicit `async` marker (``AsyncBoundary`` attribute) had to be added.
|
||||||
defined ``blocking-io-dispatcher`` as default followed by a ``map`` will now be separated by an async boundary, which was not
|
defined ``blocking-io-dispatcher`` as default followed by a ``map`` will now be separated by an async boundary, which was not
|
||||||
the case in 2.4.
|
the case in 2.4.
|
||||||
|
|
||||||
|
Removal of the auto-fuse setting
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
In 2.4 fusing stages together into the same actor could be completely disabled with the setting
|
||||||
|
``akka.stream.materializer.auto-fusing``. The new materializer introduced in Akka 2.5 does not support disabling fusing,
|
||||||
|
so this setting does not have any effect any more and has been deprecated. Running each stage in a stream on a separate
|
||||||
|
actor can be done by adding explicit async boundaries around every stage. How to add asynchronous boundaries can be seen
|
||||||
|
in :ref:`operator-fusion-java` (Java) and :ref:`operator-fusion-scala` (Scala).
|
||||||
|
|
||||||
Remote
|
Remote
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -226,6 +226,8 @@ which will be running on the thread pools they have been configured to run on -
|
||||||
Reusing *instances* of linear computation stages (Source, Sink, Flow) inside composite Graphs is legal,
|
Reusing *instances* of linear computation stages (Source, Sink, Flow) inside composite Graphs is legal,
|
||||||
yet will materialize that stage multiple times.
|
yet will materialize that stage multiple times.
|
||||||
|
|
||||||
|
.. _operator-fusion-scala:
|
||||||
|
|
||||||
Operator Fusion
|
Operator Fusion
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ akka {
|
||||||
# Enable automatic fusing of all graphs that are run. For short-lived streams
|
# Enable automatic fusing of all graphs that are run. For short-lived streams
|
||||||
# this may cause an initial runtime overhead, but most of the time fusing is
|
# this may cause an initial runtime overhead, but most of the time fusing is
|
||||||
# desirable since it reduces the number of Actors that are created.
|
# desirable since it reduces the number of Actors that are created.
|
||||||
|
# Deprecated, since Akka 2.5.0, setting does not have any effect.
|
||||||
auto-fusing = on
|
auto-fusing = on
|
||||||
|
|
||||||
# Those stream elements which have explicit buffers (like mapAsync, mapAsyncUnordered,
|
# Those stream elements which have explicit buffers (like mapAsync, mapAsyncUnordered,
|
||||||
|
|
|
||||||
|
|
@ -433,6 +433,7 @@ final class ActorMaterializerSettings private (
|
||||||
* this may cause an initial runtime overhead, but most of the time fusing is
|
* this may cause an initial runtime overhead, but most of the time fusing is
|
||||||
* desirable since it reduces the number of Actors that are created.
|
* desirable since it reduces the number of Actors that are created.
|
||||||
*/
|
*/
|
||||||
|
@deprecated(since = "2.5.0", message = "Turning off fusing is no longer possible with the traversal based materializer")
|
||||||
def withAutoFusing(enable: Boolean): ActorMaterializerSettings =
|
def withAutoFusing(enable: Boolean): ActorMaterializerSettings =
|
||||||
if (enable == this.autoFusing) this
|
if (enable == this.autoFusing) this
|
||||||
else copy(autoFusing = enable)
|
else copy(autoFusing = enable)
|
||||||
|
|
|
||||||
|
|
@ -347,6 +347,10 @@ case class PhasedFusingActorMaterializer(
|
||||||
_logger.warning("Fuzzing mode is enabled on this system. If you see this warning on your production system then " +
|
_logger.warning("Fuzzing mode is enabled on this system. If you see this warning on your production system then " +
|
||||||
"set akka.stream.materializer.debug.fuzzing-mode to off.")
|
"set akka.stream.materializer.debug.fuzzing-mode to off.")
|
||||||
}
|
}
|
||||||
|
if (!settings.autoFusing) {
|
||||||
|
_logger.warning("Deprecated setting auto-fusing set to false. Since Akka 2.5.0 it does not have any effect " +
|
||||||
|
"and streams are always fused.")
|
||||||
|
}
|
||||||
|
|
||||||
override def shutdown(): Unit =
|
override def shutdown(): Unit =
|
||||||
if (haveShutDown.compareAndSet(false, true)) supervisor ! PoisonPill
|
if (haveShutDown.compareAndSet(false, true)) supervisor ! PoisonPill
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue