Internal dispatcher to protect against starvation (#26816)

* Allow for dispatcher aliases and define a internal dispatcher
* Test checking dispatcher name
* MiMa for Dispatchers
* Migration guide entry
* No need to have custom dispatcher lookup logic in streams anymore
* Default dispatcher size and migration note about that
* Test checking exact config values...
* Typed receptionist on internal dispatcher
* All internal usages of system.dispatcher gone through
This commit is contained in:
Johan Andrén 2019-05-02 22:35:25 +02:00 committed by Patrik Nordwall
parent e34a711adf
commit 81b1e2ef9b
57 changed files with 524 additions and 329 deletions

View file

@ -22,8 +22,7 @@
# Provides periodic statistics collection and publication throughout the cluster.
akka.cluster.metrics {
# Full path of dispatcher configuration key.
# Use "" for default key `akka.actor.default-dispatcher`.
dispatcher = ""
dispatcher = "akka.actor.default-dispatcher"
# How long should any actor wait before starting the periodic tasks.
periodic-tasks-initial-delay = 1s
# Sigar native library extract location.

View file

@ -5,7 +5,6 @@
package akka.cluster.metrics
import com.typesafe.config.Config
import akka.dispatch.Dispatchers
import scala.concurrent.duration.FiniteDuration
import akka.util.Helpers.Requiring
import akka.util.Helpers.ConfigOps
@ -19,10 +18,7 @@ case class ClusterMetricsSettings(config: Config) {
private val cc = config.getConfig("akka.cluster.metrics")
// Extension.
val MetricsDispatcher: String = cc.getString("dispatcher") match {
case "" => Dispatchers.DefaultDispatcherId
case id => id
}
val MetricsDispatcher: String = cc.getString("dispatcher")
val PeriodicTasksInitialDelay: FiniteDuration = cc.getMillisDuration("periodic-tasks-initial-delay")
val NativeLibraryExtractFolder: String = cc.getString("native-library-extract-folder")