From 717e2191a19497e9e05a996b211399bdf307db6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Andre=CC=81n?= Date: Mon, 21 Sep 2015 15:40:24 +0200 Subject: [PATCH 01/16] =act #15159 Better error when maibox does not fulfill requirements --- akka-actor/src/main/scala/akka/dispatch/Mailboxes.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/akka-actor/src/main/scala/akka/dispatch/Mailboxes.scala b/akka-actor/src/main/scala/akka/dispatch/Mailboxes.scala index 9747c10073..9f69bcd76a 100644 --- a/akka-actor/src/main/scala/akka/dispatch/Mailboxes.scala +++ b/akka-actor/src/main/scala/akka/dispatch/Mailboxes.scala @@ -136,10 +136,12 @@ private[akka] class Mailboxes( lazy val mqType: Class[_] = getProducedMessageQueueType(mailboxType) if (hasMailboxRequirement && !mailboxRequirement.isAssignableFrom(mqType)) throw new IllegalArgumentException( - s"produced message queue type [$mqType] does not fulfill requirement for dispatcher [${id}]") + s"produced message queue type [$mqType] does not fulfill requirement for dispatcher [$id]. " + + s"Must be a subclass of [$mailboxRequirement].") if (hasRequiredType(actorClass) && !actorRequirement.isAssignableFrom(mqType)) throw new IllegalArgumentException( - s"produced message queue type [$mqType] does not fulfill requirement for actor class [$actorClass]") + s"produced message queue type [$mqType] does not fulfill requirement for actor class [$actorClass]. " + + s"Must be a subclass of [$actorRequirement].") mailboxType } From 9d576b4eb5e2844712b1fb08e03ad338b5e6e469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Andre=CC=81n?= Date: Wed, 23 Sep 2015 11:58:38 +0200 Subject: [PATCH 02/16] =per #18527 fix race condition in async stash test --- .../akka/persistence/PersistentActorStashingSpec.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/akka-persistence/src/test/scala/akka/persistence/PersistentActorStashingSpec.scala b/akka-persistence/src/test/scala/akka/persistence/PersistentActorStashingSpec.scala index 16fe5f3117..b2a3a24793 100644 --- a/akka-persistence/src/test/scala/akka/persistence/PersistentActorStashingSpec.scala +++ b/akka-persistence/src/test/scala/akka/persistence/PersistentActorStashingSpec.scala @@ -163,8 +163,12 @@ class SteppingInMemPersistentActorStashingSpec extends PersistenceSpec( SteppingInmemJournal.step(journal) SteppingInmemJournal.step(journal) - persistentActor ! GetState - expectMsg(List("a", "c", "b")) + within(3.seconds) { + awaitAssert { + persistentActor ! GetState + expectMsg(List("a", "c", "b")) + } + } } } From b90868d5246bd5ba7527cb314faa4c43c9a19db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Andre=CC=81n?= Date: Mon, 21 Sep 2015 14:43:57 +0200 Subject: [PATCH 03/16] =doc #16399 Document async appender for SLF4J --- akka-docs/rst/java/logging.rst | 19 ++++++++++++++++++- akka-docs/rst/scala/logging.rst | 17 +++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/akka-docs/rst/java/logging.rst b/akka-docs/rst/java/logging.rst index d8fa164994..9d95c48233 100644 --- a/akka-docs/rst/java/logging.rst +++ b/akka-docs/rst/java/logging.rst @@ -231,7 +231,12 @@ Loggers ======= Logging is performed asynchronously through an event bus. Log events are processed by an event handler actor -and it will receive the log events in the same order as they were emitted. +and it will receive the log events in the same order as they were emitted. + +.. note:: + The event handler actor does not have a bounded inbox and is run on the default dispatcher. This means + that logging extreme amounts of data may affect your application badly. It can be somewhat mitigated by + making sure to use an async logging backend though. (See :ref:`slf4j-directly-java`) You can configure which event handlers are created at system start-up and listen to logging events. That is done using the ``loggers`` element in the :ref:`configuration`. @@ -323,6 +328,18 @@ the first case and ``LoggerFactory.getLogger(String s)`` in the second). final LoggingAdapter log = Logging.getLogger(system.eventStream(), "my.string"); +.. _slf4j-directly-java: + +Using the SLF4J API directly +---------------------------- +If you use the SLF4J API directly in your application, remember that the logging operations will block +while the underlying infrastructure writes the log statements. + +This can be avoided by configuring the logging implementation to use +a non-blocking appender. Logback provides `AsyncAppender `_ +that does this. It also contains a feature which will drop ``INFO`` and ``DEBUG`` messages if the logging +load is high. + Logging Thread, Akka Source and Actor System in MDC --------------------------------------------------- diff --git a/akka-docs/rst/scala/logging.rst b/akka-docs/rst/scala/logging.rst index 7422fc553f..796ea7aca1 100644 --- a/akka-docs/rst/scala/logging.rst +++ b/akka-docs/rst/scala/logging.rst @@ -274,6 +274,11 @@ Loggers Logging is performed asynchronously through an event bus. Log events are processed by an event handler actor and it will receive the log events in the same order as they were emitted. +.. note:: + The event handler actor does not have a bounded inbox and is run on the default dispatcher. This means + that logging extreme amounts of data may affect your application badly. It can be somewhat mitigated by + making sure to use an async logging backend though. (See :ref:`slf4j-directly-scala`) + You can configure which event handlers are created at system start-up and listen to logging events. That is done using the ``loggers`` element in the :ref:`configuration`. Here you can also define the log level. More fine grained filtering based on the log source @@ -359,6 +364,18 @@ the first case and ``LoggerFactory.getLogger(s: String)`` in the second). val log = Logging(system.eventStream, "my.nice.string") +.. _slf4j-directly-scala: + +Using the SLF4J API directly +---------------------------- +If you use the SLF4J API directly in your application, remember that the logging operations will block +while the underlying infrastructure writes the log statements. + +This can be avoided by configuring the logging implementation to use +a non-blocking appender. Logback provides `AsyncAppender `_ +that does this. It also contains a feature which will drop ``INFO`` and ``DEBUG`` messages if the logging +load is high. + Logging Thread, Akka Source and Actor System in MDC --------------------------------------------------- From 20dfaded175c2ce23b283333f2c9512936515b2c Mon Sep 17 00:00:00 2001 From: Konrad Malawski Date: Mon, 28 Sep 2015 12:59:55 +0200 Subject: [PATCH 04/16] =doc fix typo in sharding docs //cc @patriknw --- akka-docs/rst/java/cluster-sharding.rst | 2 +- akka-docs/rst/scala/cluster-sharding.rst | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/akka-docs/rst/java/cluster-sharding.rst b/akka-docs/rst/java/cluster-sharding.rst index 7f96b0ec06..4a88813ee8 100644 --- a/akka-docs/rst/java/cluster-sharding.rst +++ b/akka-docs/rst/java/cluster-sharding.rst @@ -259,7 +259,7 @@ Note that stopped entities will be started again when a new message is targeted Graceful Shutdown ----------------- -You can send the message ``ClusterSharding.GracefulShutdown`` message (``ClusterSharding.gracefulShutdownInstance +You can send the message ``ClusterSharding.GracefulShutdown`` message (``ClusterSharding.gracefulShutdownInstance`` in Java) to the ``ShardRegion`` actor to handoff all shards that are hosted by that ``ShardRegion`` and then the ``ShardRegion`` actor will be stopped. You can ``watch`` the ``ShardRegion`` actor to know when it is completed. During this period other regions will buffer messages for those shards in the same way as when a rebalance is diff --git a/akka-docs/rst/scala/cluster-sharding.rst b/akka-docs/rst/scala/cluster-sharding.rst index 4647231cf5..f5b208ed1d 100644 --- a/akka-docs/rst/scala/cluster-sharding.rst +++ b/akka-docs/rst/scala/cluster-sharding.rst @@ -262,8 +262,7 @@ Note that stopped entities will be started again when a new message is targeted Graceful Shutdown ----------------- -You can send the message ``ClusterSharding.GracefulShutdown`` message (``ClusterSharding.gracefulShutdownInstance -in Java) to the ``ShardRegion`` actor to handoff all shards that are hosted by that ``ShardRegion`` and then the +You can send the message ``ClusterSharding.GracefulShutdown`` message to the ``ShardRegion`` actor to handoff all shards that are hosted by that ``ShardRegion`` and then the ``ShardRegion`` actor will be stopped. You can ``watch`` the ``ShardRegion`` actor to know when it is completed. During this period other regions will buffer messages for those shards in the same way as when a rebalance is triggered by the coordinator. When the shards have been stopped the coordinator will allocate these shards elsewhere. From c0bba54d6b09bcd0cdd9baea516eadf286c9cef0 Mon Sep 17 00:00:00 2001 From: hepin Date: Tue, 29 Sep 2015 10:21:59 +0800 Subject: [PATCH 05/16] =doc fix typo in sharding docs --- akka-docs/rst/java/cluster-sharding.rst | 2 +- akka-docs/rst/scala/cluster-sharding.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/akka-docs/rst/java/cluster-sharding.rst b/akka-docs/rst/java/cluster-sharding.rst index 4a88813ee8..021396b448 100644 --- a/akka-docs/rst/java/cluster-sharding.rst +++ b/akka-docs/rst/java/cluster-sharding.rst @@ -36,7 +36,7 @@ The above actor uses event sourcing and the support provided in ``UntypedPersist It does not have to be a persistent actor, but in case of failure or migration of entities between nodes it must be able to recover its state if it is valuable. -Note how the ``persistenceId`` is defined. The name of the actor is the entity entity identifier (utf-8 URL-encoded). +Note how the ``persistenceId`` is defined. The name of the actor is the entity identifier (utf-8 URL-encoded). You may define it another way, but it must be unique. When using the sharding extension you are first, typically at system startup on each node diff --git a/akka-docs/rst/scala/cluster-sharding.rst b/akka-docs/rst/scala/cluster-sharding.rst index f5b208ed1d..634f4eaa74 100644 --- a/akka-docs/rst/scala/cluster-sharding.rst +++ b/akka-docs/rst/scala/cluster-sharding.rst @@ -36,7 +36,7 @@ The above actor uses event sourcing and the support provided in ``PersistentActo It does not have to be a persistent actor, but in case of failure or migration of entities between nodes it must be able to recover its state if it is valuable. -Note how the ``persistenceId`` is defined. The name of the actor is the entity entity identifier (utf-8 URL-encoded). +Note how the ``persistenceId`` is defined. The name of the actor is the entity identifier (utf-8 URL-encoded). You may define it another way, but it must be unique. When using the sharding extension you are first, typically at system startup on each node From 48754bb33f0f1049830dd0cb1085de05ba4cc621 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 30 Sep 2015 11:31:11 +0200 Subject: [PATCH 06/16] =pro #18447 Check binary compatibility with 2.4.0 --- akka-cluster-sharding/build.sbt | 2 +- akka-cluster-tools/build.sbt | 2 +- akka-distributed-data/build.sbt | 2 +- akka-persistence-query/build.sbt | 2 +- akka-persistence/build.sbt | 2 +- project/AkkaBuild.scala | 2 +- project/MiMa.scala | 7 ++++++- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/akka-cluster-sharding/build.sbt b/akka-cluster-sharding/build.sbt index 96df92a747..401da39b85 100644 --- a/akka-cluster-sharding/build.sbt +++ b/akka-cluster-sharding/build.sbt @@ -9,6 +9,6 @@ OSGi.clusterSharding Dependencies.clusterSharding -//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-sharding").value +MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-sharding").value enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams) diff --git a/akka-cluster-tools/build.sbt b/akka-cluster-tools/build.sbt index cc96358e65..1a10f69d96 100644 --- a/akka-cluster-tools/build.sbt +++ b/akka-cluster-tools/build.sbt @@ -9,6 +9,6 @@ OSGi.clusterTools Dependencies.clusterTools -//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-tools").value +MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-tools").value enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams) diff --git a/akka-distributed-data/build.sbt b/akka-distributed-data/build.sbt index 5619335700..ecd4ff67e2 100644 --- a/akka-distributed-data/build.sbt +++ b/akka-distributed-data/build.sbt @@ -11,7 +11,7 @@ OSGi.distributedData Dependencies.distributedData -//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-distributed-data").value +MimaKeys.previousArtifact := akkaPreviousArtifact("akka-distributed-data-experimental").value enablePlugins(MultiNodeScalaTest) diff --git a/akka-persistence-query/build.sbt b/akka-persistence-query/build.sbt index b961d4be5f..74f07a4553 100644 --- a/akka-persistence-query/build.sbt +++ b/akka-persistence-query/build.sbt @@ -11,7 +11,7 @@ OSGi.persistenceQuery Dependencies.persistenceQuery -//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence-query-experimental").value +MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence-query-experimental").value enablePlugins(ScaladocNoVerificationOfDiagrams) diff --git a/akka-persistence/build.sbt b/akka-persistence/build.sbt index 8800ddc43e..cb94e7099f 100644 --- a/akka-persistence/build.sbt +++ b/akka-persistence/build.sbt @@ -9,6 +9,6 @@ OSGi.persistence Dependencies.persistence -MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence-experimental").value +MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence").value fork in Test := true diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index e9348b01d2..935b17a2dc 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -406,7 +406,7 @@ object AkkaBuild extends Build { def akkaPreviousArtifact(id: String): Def.Initialize[Option[sbt.ModuleID]] = Def.setting { if (enableMiMa) { - val version: String = "2.3.11" // FIXME verify all 2.3.x versions + val version: String = "2.4.0" // FIXME verify all 2.3.x versions val fullId = crossVersion.value match { case _ : CrossVersion.Binary => id + "_" + scalaBinaryVersion.value case _ : CrossVersion.Full => id + "_" + scalaVersion.value diff --git a/project/MiMa.scala b/project/MiMa.scala index 4e1c820d4c..f46ae52aa4 100644 --- a/project/MiMa.scala +++ b/project/MiMa.scala @@ -33,7 +33,11 @@ object MiMa extends AutoPlugin { } val mimaIgnoredProblems = { - import com.typesafe.tools.mima.core._ + import com.typesafe.tools.mima.core._ + Seq() + + // FIXME somehow we must use different filters when akkaPreviousArtifact is 2.3.x + /* Below are the filters we used when comparing to 2.3.x Seq( FilterAnyProblem("akka.remote.testconductor.Terminate"), FilterAnyProblem("akka.remote.testconductor.TerminateMsg"), @@ -572,5 +576,6 @@ object MiMa extends AutoPlugin { ProblemFilters.exclude[IncompatibleMethTypeProblem]("akka.cluster.ClusterCoreDaemon.akka$cluster$ClusterCoreDaemon$$isJoiningToUp$1") ) + */ } } From 1830b729bba397664902d8a394445bd198c4d8c9 Mon Sep 17 00:00:00 2001 From: Roland Kuhn Date: Thu, 1 Oct 2015 11:14:54 +0200 Subject: [PATCH 07/16] =act correct two comments in AbstractNodeQueue.java --- .../src/main/java/akka/dispatch/AbstractNodeQueue.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java b/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java index 9211b07d39..8e8ab38091 100644 --- a/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java +++ b/akka-actor/src/main/java/akka/dispatch/AbstractNodeQueue.java @@ -14,7 +14,8 @@ import java.util.concurrent.atomic.AtomicReference; */ @SuppressWarnings("serial") public abstract class AbstractNodeQueue extends AtomicReference> { - // Extends AtomicReference for the "head" slot (which is the one that is appended to) since Unsafe does not expose XCHG operation intrinsically + // Extends AtomicReference for the "head" slot (which is the one that is appended to) since + // Unsafe does not expose XCHG operation intrinsically before JDK 8 @SuppressWarnings("unused") private volatile Node _tailDoNotCallMeDirectly; @@ -34,7 +35,7 @@ public abstract class AbstractNodeQueue extends AtomicReference tail = ((Node)Unsafe.instance.getObjectVolatile(this, tailOffset)); Node next = tail.next(); if (next == null && get() != tail) { - // if tail != head this is not going to change until consumer makes progress + // if tail != head this is not going to change until producer makes progress // we can avoid reading the head and just spin on next until it shows up do { next = tail.next(); From a2df19320fde4ab5de0a60064859606af72c3514 Mon Sep 17 00:00:00 2001 From: Konrad Malawski Date: Thu, 1 Oct 2015 13:44:15 +0200 Subject: [PATCH 08/16] =doc Remove experimental marker from persistence TCK --- akka-docs/rst/java/persistence.rst | 6 +++--- akka-docs/rst/scala/persistence.rst | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/akka-docs/rst/java/persistence.rst b/akka-docs/rst/java/persistence.rst index 971202c78f..157145028f 100644 --- a/akka-docs/rst/java/persistence.rst +++ b/akka-docs/rst/java/persistence.rst @@ -799,12 +799,12 @@ Plugin TCK ---------- In order to help developers build correct and high quality storage plugins, we provide an Technology Compatibility Kit (`TCK `_ for short). -The TCK is usable from Java as well as Scala projects, for Java you need to include the akka-persistence-tck-experimental dependency:: +The TCK is usable from Java as well as Scala projects, for Java you need to include the akka-persistence-tck dependency:: com.typesafe.akka - akka-persistence-tck-experimental_${scala.version} - 2.3.5 + akka-persistence-tck_${scala.version} + @version@ test diff --git a/akka-docs/rst/scala/persistence.rst b/akka-docs/rst/scala/persistence.rst index b707cb82f8..0c73f11c6b 100644 --- a/akka-docs/rst/scala/persistence.rst +++ b/akka-docs/rst/scala/persistence.rst @@ -858,9 +858,9 @@ Plugin TCK ---------- In order to help developers build correct and high quality storage plugins, we provide an Technology Compatibility Kit (`TCK `_ for short). -The TCK is usable from Java as well as Scala projects, for Scala you need to include the akka-persistence-tck-experimental dependency:: +The TCK is usable from Java as well as Scala projects, for Scala you need to include the akka-persistence-tck dependency:: - "com.typesafe.akka" %% "akka-persistence-tck-experimental" % "@version@" % "test" + "com.typesafe.akka" %% "akka-persistence-tck" % "@version@" % "test" To include the Journal TCK tests in your test suite simply extend the provided ``JournalSpec``: From 01887555a4fd59cd067db75a37368e95be64ece9 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Fri, 2 Oct 2015 09:57:15 +0200 Subject: [PATCH 09/16] =doc Add section about persistence failures in migration guide --- akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst b/akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst index a62ba95d20..115c5e3e89 100644 --- a/akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst +++ b/akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst @@ -413,6 +413,12 @@ implement it yourself either as a helper trait or simply by overriding ``persist override def persistenceId = self.path.toStringWithoutAddress +Failures +-------- + +Backend journal failures during recovery and persist are treated differently than in 2.3.x. The ``PersitenceFailure`` +message is removed and the actor is unconditionally stopped. The new behavior and reasons for it is explained in +:ref:`failures-scala`. Persist sequence of events -------------------------- From cb8bcdac0a151963bf35f2b79ba6e13ec096da61 Mon Sep 17 00:00:00 2001 From: Oleg Date: Fri, 2 Oct 2015 22:23:17 +0300 Subject: [PATCH 10/16] Remove extra dot --- akka-docs/rst/scala/testing.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/akka-docs/rst/scala/testing.rst b/akka-docs/rst/scala/testing.rst index 090fe0e6c7..71fed1ac7b 100644 --- a/akka-docs/rst/scala/testing.rst +++ b/akka-docs/rst/scala/testing.rst @@ -748,7 +748,6 @@ options: .. includecode:: code/docs/testkit/TestkitDocSpec.scala#logging-receive -. If the aforementioned setting is not given in the :ref:`configuration`, this method will pass through the given :class:`Receive` function unmodified, meaning that there is no runtime cost unless actually enabled. From 233ea96690cc0d43ae4646a3cb4ad5aeb3bd31f3 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Mon, 5 Oct 2015 10:29:09 +0200 Subject: [PATCH 11/16] cleanup some test configuration --- akka-actor/src/main/resources/reference.conf | 4 ---- .../scala/akka/persistence/AtLeastOnceDeliverySpec.scala | 3 +-- .../akka/remote/RemoteNodeShutdownAndComesBackSpec.scala | 1 - .../scala/akka/remote/RemoteQuarantinePiercingSpec.scala | 2 -- .../src/multi-jvm/scala/akka/remote/Ticket15109Spec.scala | 1 - akka-remote/src/test/scala/akka/remote/RemotingSpec.scala | 6 ++---- .../scala/akka/remote/Ticket1978CommunicationSpec.scala | 1 - .../test/scala/akka/remote/transport/AkkaProtocolSpec.scala | 1 - .../akka/remote/transport/AkkaProtocolStressTest.scala | 1 - 9 files changed, 3 insertions(+), 17 deletions(-) diff --git a/akka-actor/src/main/resources/reference.conf b/akka-actor/src/main/resources/reference.conf index 0b9784c260..acf6fc71af 100644 --- a/akka-actor/src/main/resources/reference.conf +++ b/akka-actor/src/main/resources/reference.conf @@ -82,10 +82,6 @@ akka { # Timeout for ActorSystem.actorOf creation-timeout = 20s - # Frequency with which stopping actors are prodded in case they had to be - # removed from their parents - reaper-interval = 5s - # Serializes and deserializes (non-primitive) messages to ensure immutability, # this is only intended for testing. serialize-messages = off diff --git a/akka-persistence/src/test/scala/akka/persistence/AtLeastOnceDeliverySpec.scala b/akka-persistence/src/test/scala/akka/persistence/AtLeastOnceDeliverySpec.scala index 6c66b733e3..79c699486a 100644 --- a/akka-persistence/src/test/scala/akka/persistence/AtLeastOnceDeliverySpec.scala +++ b/akka-persistence/src/test/scala/akka/persistence/AtLeastOnceDeliverySpec.scala @@ -407,8 +407,7 @@ abstract class AtLeastOnceDeliverySpec(config: Config) extends PersistenceSpec(c } class LeveldbAtLeastOnceDeliverySpec extends AtLeastOnceDeliverySpec( - // TODO disable debug logging once happy with stability of this test - ConfigFactory.parseString("""akka.logLevel = DEBUG""") withFallback PersistenceSpec.config("leveldb", "AtLeastOnceDeliverySpec")) + PersistenceSpec.config("leveldb", "AtLeastOnceDeliverySpec")) @org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner]) class InmemAtLeastOnceDeliverySpec extends AtLeastOnceDeliverySpec(PersistenceSpec.config("inmem", "AtLeastOnceDeliverySpec")) diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteNodeShutdownAndComesBackSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteNodeShutdownAndComesBackSpec.scala index 558f0d9763..7717735d31 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteNodeShutdownAndComesBackSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteNodeShutdownAndComesBackSpec.scala @@ -30,7 +30,6 @@ object RemoteNodeShutdownAndComesBackSpec extends MultiNodeConfig { akka.remote.transport-failure-detector.heartbeat-interval = 1 s akka.remote.transport-failure-detector.acceptable-heartbeat-pause = 3 s akka.remote.watch-failure-detector.acceptable-heartbeat-pause = 60 s - akka.remote.gate-invalid-addresses-for = 0.5 s """))) testTransport(on = true) diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteQuarantinePiercingSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteQuarantinePiercingSpec.scala index 18436d4470..ff8d4d11e1 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteQuarantinePiercingSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteQuarantinePiercingSpec.scala @@ -26,8 +26,6 @@ object RemoteQuarantinePiercingSpec extends MultiNodeConfig { ConfigFactory.parseString(""" akka.loglevel = INFO akka.remote.log-remote-lifecycle-events = INFO - akka.remote.quarantine-systems-for = 1 d - akka.remote.gate-invalid-addresses-for = 0.5 s """))) class Subject extends Actor { diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/Ticket15109Spec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/Ticket15109Spec.scala index 3235270788..ee3217a3a2 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/Ticket15109Spec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/Ticket15109Spec.scala @@ -31,7 +31,6 @@ object Ticket15109Spec extends MultiNodeConfig { ## Keep it tight, otherwise reestablishing a connection takes too much time akka.remote.transport-failure-detector.heartbeat-interval = 1 s akka.remote.transport-failure-detector.acceptable-heartbeat-pause = 3 s - akka.remote.quarantine-systems-for = 1 d akka.remote.retry-gate-closed-for = 0.5 s """))) diff --git a/akka-remote/src/test/scala/akka/remote/RemotingSpec.scala b/akka-remote/src/test/scala/akka/remote/RemotingSpec.scala index ea4b0966cd..f2298cd4f2 100644 --- a/akka-remote/src/test/scala/akka/remote/RemotingSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/RemotingSpec.scala @@ -82,8 +82,6 @@ object RemotingSpec { actor.provider = "akka.remote.RemoteActorRefProvider" remote { - transport = "akka.remote.Remoting" - retry-gate-closed-for = 1 s log-remote-lifecycle-events = on @@ -637,7 +635,7 @@ class RemotingSpec extends AkkaSpec(RemotingSpec.cfg) with ImplicitSender with D val config = ConfigFactory.parseString(s""" akka.remote.enabled-transports = ["akka.remote.test"] akka.remote.retry-gate-closed-for = 5s - akka.remote.log-lifecylce-events = on + akka.remote.log-remote-lifecycle-events = on #akka.loglevel = DEBUG akka.remote.test { @@ -717,7 +715,7 @@ class RemotingSpec extends AkkaSpec(RemotingSpec.cfg) with ImplicitSender with D val config = ConfigFactory.parseString(s""" akka.remote.enabled-transports = ["akka.remote.test"] akka.remote.retry-gate-closed-for = 5s - akka.remote.log-lifecylce-events = on + akka.remote.log-remote-lifecycle-events = on akka.remote.test { registry-key = JMeMndLLsw diff --git a/akka-remote/src/test/scala/akka/remote/Ticket1978CommunicationSpec.scala b/akka-remote/src/test/scala/akka/remote/Ticket1978CommunicationSpec.scala index ee3ab57fa7..fe19fe7d03 100644 --- a/akka-remote/src/test/scala/akka/remote/Ticket1978CommunicationSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/Ticket1978CommunicationSpec.scala @@ -42,7 +42,6 @@ object Configuration { hostname = localhost port = %d security { - enable = on trust-store = "%s" key-store = "%s" key-store-password = "changeme" diff --git a/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolSpec.scala b/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolSpec.scala index 78e90abc5c..871af1dd73 100644 --- a/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolSpec.scala @@ -38,7 +38,6 @@ class AkkaProtocolSpec extends AkkaSpec("""akka.actor.provider = "akka.remote.Re transport-failure-detector { implementation-class = "akka.remote.PhiAccrualFailureDetector" - threshold = 7.0 max-sample-size = 100 min-std-deviation = 100 ms acceptable-heartbeat-pause = 3 s diff --git a/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolStressTest.scala b/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolStressTest.scala index b952790251..8aad94bf07 100644 --- a/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolStressTest.scala +++ b/akka-remote/src/test/scala/akka/remote/transport/AkkaProtocolStressTest.scala @@ -20,7 +20,6 @@ object AkkaProtocolStressTest { remote.log-remote-lifecycle-events = on remote.transport-failure-detector { - threshold = 1.0 max-sample-size = 2 min-std-deviation = 1 ms ## We want lots of lost connections in this test, keep it sensitive From cccf6a5b85359ede9bafa8d05fe302be8f4dcf78 Mon Sep 17 00:00:00 2001 From: Konrad Malawski Date: Thu, 8 Oct 2015 12:00:09 +0200 Subject: [PATCH 12/16] +doc #18670 log errors when included snippet empty Forward port of #18670 --- akka-docs/_sphinx/exts/includecode.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/akka-docs/_sphinx/exts/includecode.py b/akka-docs/_sphinx/exts/includecode.py index 7ea125f6ed..af5684e786 100644 --- a/akka-docs/_sphinx/exts/includecode.py +++ b/akka-docs/_sphinx/exts/includecode.py @@ -109,6 +109,11 @@ class IncludeCode(Directive): return count nonempty = filter(lambda l: l.strip(), lines) + if not nonempty: + return [document.reporter.error( + "Snippet ({}#{}) not found!".format(filename, section), + line=self.lineno + )] tabcounts = map(lambda l: countwhile(lambda c: c == ' ', l), nonempty) tabshift = min(tabcounts) if tabcounts else 0 From 8693e5899baef8f3fb3faf91d5d551477ef975d4 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Thu, 8 Oct 2015 12:03:37 +0200 Subject: [PATCH 13/16] =doc correction of PersitenceFailure typo --- akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst b/akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst index 115c5e3e89..7eced6d4f1 100644 --- a/akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst +++ b/akka-docs/rst/project/migration-guide-2.3.x-2.4.x.rst @@ -416,7 +416,7 @@ implement it yourself either as a helper trait or simply by overriding ``persist Failures -------- -Backend journal failures during recovery and persist are treated differently than in 2.3.x. The ``PersitenceFailure`` +Backend journal failures during recovery and persist are treated differently than in 2.3.x. The ``PersistenceFailure`` message is removed and the actor is unconditionally stopped. The new behavior and reasons for it is explained in :ref:`failures-scala`. From f3e13341c2c86b24196d4a70e75432adfca99ccf Mon Sep 17 00:00:00 2001 From: Nils-Helge Garli Hegvik Date: Wed, 7 Oct 2015 23:13:07 +0200 Subject: [PATCH 14/16] =per #18646 Remove double wrapping of PersistentRepr in writeMessages --- .../akka/persistence/journal/JournalSpec.scala | 2 +- ...rnalNoAtomicPersistMultipleEventsSpec.scala | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 akka-persistence-tck/src/test/scala/akka/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala diff --git a/akka-persistence-tck/src/main/scala/akka/persistence/journal/JournalSpec.scala b/akka-persistence-tck/src/main/scala/akka/persistence/journal/JournalSpec.scala index 8bb124a4cf..c60562ac69 100644 --- a/akka-persistence-tck/src/main/scala/akka/persistence/journal/JournalSpec.scala +++ b/akka-persistence-tck/src/main/scala/akka/persistence/journal/JournalSpec.scala @@ -71,7 +71,7 @@ abstract class JournalSpec(config: Config) extends PluginSpec(config) { } } else { (fromSnr to toSnr).map { i ⇒ - AtomicWrite(PersistentRepr(persistentRepr(i))) + AtomicWrite(persistentRepr(i)) } } diff --git a/akka-persistence-tck/src/test/scala/akka/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala b/akka-persistence-tck/src/test/scala/akka/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala new file mode 100644 index 0000000000..3e04471ce5 --- /dev/null +++ b/akka-persistence-tck/src/test/scala/akka/persistence/journal/leveldb/LeveldbJournalNoAtomicPersistMultipleEventsSpec.scala @@ -0,0 +1,18 @@ +package akka.persistence.journal.leveldb + +import akka.persistence.journal.JournalSpec +import akka.persistence.{ PersistenceSpec, PluginCleanup } + +class LeveldbJournalNoAtomicPersistMultipleEventsSpec extends JournalSpec( + config = PersistenceSpec.config( + "leveldb", + "LeveldbJournalNoAtomicPersistMultipleEventsSpec", + extraConfig = Some("akka.persistence.journal.leveldb.native = off"))) + with PluginCleanup { + + /** + * Setting to false to test the single message atomic write behaviour of JournalSpec + */ + override def supportsAtomicPersistAllOfSeveralEvents = false +} + From 39ce1f818f417799d4d11c08247c3b755a20d68a Mon Sep 17 00:00:00 2001 From: Markus Hauck Date: Mon, 12 Oct 2015 16:05:44 +0200 Subject: [PATCH 15/16] =doc Add missing words in Configuration doc The sentence is incomplete as is, this adds the words "is logged" to the middle of: ..., then the complete configuration at INFO level when the actor system is started." --- akka-docs/rst/general/configuration.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/akka-docs/rst/general/configuration.rst b/akka-docs/rst/general/configuration.rst index 8181ea4e53..1fd9624337 100644 --- a/akka-docs/rst/general/configuration.rst +++ b/akka-docs/rst/general/configuration.rst @@ -196,8 +196,8 @@ Logging of Configuration ------------------------ If the system or config property ``akka.log-config-on-start`` is set to ``on``, then the -complete configuration at INFO level when the actor system is started. This is useful -when you are uncertain of what configuration is used. +complete configuration is logged at INFO level when the actor system is started. This is +useful when you are uncertain of what configuration is used. If in doubt, you can also easily and nicely inspect configuration objects before or after using them to construct an actor system: From 1be320fab9ce057d9d4c68d22035ebdb4b68c970 Mon Sep 17 00:00:00 2001 From: michaelom Date: Tue, 13 Oct 2015 11:35:27 +0200 Subject: [PATCH 16/16] =doc fix dispatchers docs nr typo, see #18712 --- akka-docs/rst/java/dispatchers.rst | 2 +- akka-docs/rst/scala/dispatchers.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/akka-docs/rst/java/dispatchers.rst b/akka-docs/rst/java/dispatchers.rst index 6e16647824..bff8045513 100644 --- a/akka-docs/rst/java/dispatchers.rst +++ b/akka-docs/rst/java/dispatchers.rst @@ -61,7 +61,7 @@ of programmatically provided parameter. Types of dispatchers -------------------- -There are 4 different types of message dispatchers: +There are 3 different types of message dispatchers: * Dispatcher diff --git a/akka-docs/rst/scala/dispatchers.rst b/akka-docs/rst/scala/dispatchers.rst index 14b0eec1af..4c05ff8e5e 100644 --- a/akka-docs/rst/scala/dispatchers.rst +++ b/akka-docs/rst/scala/dispatchers.rst @@ -61,7 +61,7 @@ of programmatically provided parameter. Types of dispatchers -------------------- -There are 4 different types of message dispatchers: +There are 3 different types of message dispatchers: * Dispatcher