Commit graph

172 commits

Author SHA1 Message Date
Scala Steward
63df007685 protoc version 3.10.0 2019-10-14 11:11:21 +02:00
Patrik Nordwall
a217d5566e
Remove auto-downing, #27788 (#27855)
* moved to cluster tests, in new package akka.cluster.testkit
* changed config in tests
* migration guide
* documentation clarificiations for Downing and Leaving
* update warnings in Singleton and Sharding
2019-10-03 14:08:43 +02:00
Johannes Rudolph
650068aa45
Convert 2.5.x MiMa excludes to subdirectory style
Using this script:

```sh

set -ex

FILE=$1
DIR=`dirname $FILE`
TMP_FILE=$DIR/_existing.excludes
FINAL_FILE=$DIR/2.5.x.backwards.excludes/_existing.excludes

mv $FILE $TMP_FILE
mkdir $DIR/2.5.x.backwards.excludes
(echo "# This file contains all excludes added before changing to the subdirectory style" && cat $TMP_FILE) > $FINAL_FILE
rm $TMP_FILE
git add $FINAL_FILE
```
2019-10-01 13:59:56 +02:00
Johan Andrén
2503b13138 Try to get root cause of timeout in ReplciatorPruningSpec #26957 2019-09-30 18:18:28 +02:00
Patrik Nordwall
a7c43cf573
Config to exclude class prefix from serialize-messages, #24273 (#27517)
* Config to exclude class prefix from serialize-messages, #24273

* Adding no-serialization-verification-needed-class-prefix, with "akka." included
  by default
* This is important now when we disable Java serialization by default.
  There will be many complaints about Akka internal classes that are not marked with
  NoSerializationVerificationNeeded, and we can't really sprinkle that everywhere.
* Not removing NoSerializationVerificationNeeded usage in Akka classes because that
  may break bin compat, even though it's needed any more.

* fix DisabledJavaSerializerWarningSpec
2019-09-26 22:51:12 +02:00
Patrik Nordwall
89eab3541c
Merge pull request #27511 from akka/wip-27371-DataDeleted-patriknw
API changes related to DataDeleted, #27371
2019-09-11 16:28:17 +02:00
Arnout Engelen
e6859253e5 Update to MiMa 0.6.0 (#27558) 2019-09-11 11:28:12 +02:00
Patrik Nordwall
1d09d2725b API changes related to DataDeleted, #27371
* The reason for this change is that `DataDeleted` didn't extend the
  `UpdateResponse` and `GetResponse` types and could therefore cause problems
  when `Update` and `Get` were used with `ask`. This was also a problem for
  Akka Typed.
* Introduce new messages types UpdateDataDeleted and GetDataDeleted
* Introduce SubscribeResponse because the responses can be both `Changed`
  and `Deleted` are responses to subscriptions. Important for Typed.
2019-09-10 17:09:04 +02:00
Patrik Nordwall
68424b4f55 Complete logging with SLF4J in Typed, #26537
* TestAppender interaction with LoggingEventFilter
  * TestAppender plays the same role as classic TestEventList
* replace Sl4jLoggingEvent.java
  * include MDC in testkit.LoggingEvent to allow for custom filter
    testing MDC
* fix tests
* fix log events in BehaviorSetKit, using SubstituteLogger
* MDC in EventSourcedBehavior
  * using raw MDC to set the persistenceId and persistencePhase fields
  * avoid access to MDC ThreadLocal if log isn't used

* Automatically enable eventStream Slf4jLogger for Typed (PR #27583)
  * amend the ActorSystem config on startup when config akka.use-slf4j=on
    and akka-slf4j in classpath
  * akka.use-slf4j is defined in akka-actor-typed reference.conf
  * also enable the Slf4jLoggingFilter automatically
  * remove config in tests

* Include actor path as akkaSource in MDC (PR #27587)
  * move logger init to ActorContextImpl since not specific to untyped (ActorContextAdapter)
  * careful to not access MDC ThreadLocal if logging isn't used (per message)
  * MDC is cleared (if used) from aroundReceive in ActorAdapter after processing each message
  * also changed MDC for EventSourcedBehavior to rely on context.log and the outer MDC.clear()
  * just removing the MDC values is not enough because the empty Map remains in the ThreadLocal

* Optimization of MDC interceptor (PR #27610)

* Extension methods to Logger as workaround for overload and varargs problem (PR #27605)
  * "ambiguous reference to overloaded definition" for 2 arg method
  * varargs not supported for primitive types
  * providing extension methods info2 and infoN (and friends) via implicit class LoggerOps
    as more convenient workaround for these problems

* New API for Typed LoggingEventFilter (PR #27611)
  * builder style
  * will make it easier to add more conditions
  * all conditions are AND:ed together which makes it easier to define custom filters
  * simplifies the implementation as a bonus
  * javadsl
  * use new api in all tests
  * leeway setting
  * verify that occurrences = 0 works
  * use javadsl in two tests
  * change interceptLogger, and some other feedback

* Testing utility to silence logging until failure (PR #27588)
  * Logback appender that captures all log events and can flush them
    later to other appenders
  * LogCapturing mixin for ScalaTest that flush the captured logging events
    when a test fails. Also clears the captured events after all tests.
  * Configuration in logback-test.xml
  * log capturing for JUnit tests too, using TestRule
  * Silence initial setup logging from Logback
  * make LogCapturing public
  * use LogCapturing in all tests
    * aside from multi-jvm, and a few extending AkkaSpec, so far
  * a few doc tests needed debug level

* mention in migration guide
* rename setLoggerClass to setLoggerName
* check for logback dependency to give nicer error message
* fix filterKeys, deprecated in 2.13
2019-09-06 10:09:54 +02:00
Helena Edelson
7e84d242ac
Scaladoc: Change untyped to classic - General Typed docs cleanup after all API changes #24717 (#27622) 2019-09-04 07:10:57 -07:00
Christopher Batey
6c13949aec Use protobuf3 for internal serialization (#27366)
* Only load akka protobuf serializer if protobuf on the classpath
2019-08-15 17:43:19 +02:00
Christopher Batey
89e269d5d8 Remove catchall silents from prod code (#27432)
* WIP

* Remove catch all silent annocations from prod code
2019-07-30 11:12:23 +02:00
Patrik Nordwall
10c2b0714a reduce message sizes for Gossip and DeltaPropagation in ddata, #27175 (#27176) 2019-07-16 14:22:16 +02:00
Patrik Nordwall
3efc1c2877
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
  from akka-remote to akka-actor since they had no dependency
  and are useful also in local systems, e.g. persistence.
  * e.g. needed for persistence-tck
  * less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
  but misconfigured
* Made tests pass
  * allow-java-serialization=on in akka-persistence
  * allow-java-serialization=on in classic remoting tests
  * JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
  * Boolean
  * java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
  * Effect() is factory in EventSourcedBehavior  class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
  * fallback to akka.remote.serialization.ThrowableNotSerializableException
    if exception is not serializable when wrapped in system messages from
    remote deployed child actors and Status.Failure messages
  * it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
  improving or removing that feature
* migration guide, including description of rolling update

* fix 2.13 compiler error

* minor review feedback
2019-07-11 14:04:24 +02:00
Patrik Nordwall
50e99e08d8 Use short configurable timeout for expectNoMessage #27212 (#27213)
* Use short configurable timeout for expectNoMessage #27212

* consistent with ActorTestKit in Typed

* fix config
2019-06-26 15:35:20 +01:00
Patrik Nordwall
10d32fceb9 scheduleWithFixedDelay vs scheduleAtFixedRate, #26910
* previous `schedule` method is trying to maintain a fixed average frequency
  over time, but that can result in undesired bursts of scheduled tasks after a long
  GC or if the JVM process has been suspended, same with all other periodic
  scheduled message sending via various Timer APIs
* most of the time "fixed delay" is more desirable
* we can't just change because it's too big behavioral change and some might
  depend on previous behavior
* deprecate the old `schedule` and introduce new `scheduleWithFixedDelay`
  and `scheduleAtFixedRate`, when fixing the deprecation warning users should
  make a concious decision of which behavior to use (scheduleWithFixedDelay in
  most cases)

* Streams
* SchedulerSpec
  * test both fixed delay and fixed rate
* TimerSpec
* FSM and PersistentFSM
* mima
* runnable as second parameter list, also in typed.Scheduler
* IllegalStateException vs SchedulerException
* deprecated annotations
* api and reference docs, all places
* migration guide
2019-06-05 11:38:04 +02:00
Patrik Nordwall
375228273f
Improve logging in DistributedData extension (#27051)
* and don't load extension from ClusterReceptionist since that will
  trigger the warning logging if role is defined
2019-06-03 09:31:28 +02:00
Arnout Engelen
814cfa286c Scala 2.13.0 rc2 (#26967) 2019-05-24 08:11:50 +02:00
Patrik Nordwall
71e9bdc262 more classic remoting leftovers
* fix several tests that were using akka.remote.netty.tcp config
* replace akka.tcp with akka in more places
* some doc cross references to remoting.md
2019-05-15 19:34:50 +02:00
Johan Andrén
81b1e2ef9b 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
2019-05-02 22:35:25 +02:00
Christopher Batey
efc3adc08d
Make artery the default remoting (#26772) 2019-05-01 08:12:09 +01:00
Martynas Mickevičius
2184a617a3 Drop MiMa filters for 2.4.x (#26781) 2019-04-23 09:24:29 +02:00
Patrik Nordwall
a5e9741d35 replace unicode arrows again (#26732) 2019-04-15 15:40:26 +00:00
Patrik Nordwall
b44b0bfe5d fix rolling update for ddata change, #26284 2019-04-01 12:47:20 +02:00
Arnout Engelen
e6c41b6cc1
Fix links to Delta State Replicated Data Types paper 2019-03-28 12:11:55 +01:00
Patrik Nordwall
825d90bf63 Avoid false removals in ClusterReceptionist, #26284
* The scenario was (probably) that a node was restarted with
  same host:port and then didn't join the same cluster. The DData
  Replicator in the original cluster would continue sending messages
  to the new incarnation resulting in false removals.
* The fix is that DData Replicator includes the system uid of the sending
  or target system in messages and if recipient gets a message that is from/to
  unknown it will discard it and thereby not spreading information across
  different clusters.
* Reproduced in ClusterReceptionistSpec
* Much hardening of other things in ClusterReceptionistSpec
* There are also some improvements to ClusterReceptionist to not leak
  Listing with refs of removed nodes.
* use ClusterShuttingDown
* The reason for using sender system uid instead of target uid in messages
  like Read and Write is that then the optimization for sending same message
  to many destinations can remain.
2019-03-27 16:32:19 +01:00
Arnout Engelen
d390fcf183 Introduce warning silencer plugin (#26588)
So now we can compile akka-distributed-data with
-Xfatal-warnings - though I'm not yet sure about
enabling the (other) undisciplineScalacOptions

* Fix multi-node silencing
* Fix scaladoc warnings
* Introduce annotation to declare ccompat use
* Add explicit toString
* Fix deprecation on 2.13
* Move 'immutable' ccompat helpers to shared ccompat package
* Add MiMa for internal scala 2.13 compatibility class
* Internal API markers
* Fix scaladoc generation
Got bitten by https://github.com/scala/bug/issues/11021
2019-03-26 14:41:29 +01:00
Arnout Engelen
d7f12d3568 akka-distributed-data compiler warnings #26088 2019-03-19 08:12:51 +01:00
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00
Auto Format
ce404e4f53 format source with scalafmt 2019-03-11 16:58:55 +01:00
Patrik Nordwall
5c96a5f556 replace unicode arrows
* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
2019-03-11 16:58:51 +01:00
hepin1989
998c5a9285 Formatting java codes with sbt-java-formatter. 2019-01-12 04:00:53 +08:00
Arnout Engelen
d274e039f9
Various scala-2.13.0-M5 fixes
fix akka-actor-tests compile errors

some tests still fail though

Fix test failures in akka-actor-test

Manually work arround missing implicit Factory[Nothing, Seq[Nothing]]

see https://github.com/scala/scala-collection-compat/issues/137

akka-remote scalafix changes

Fix shutdownAll compile error

test:akka-remote scalafix changes

akka-multi-node-testkit scalafix

Fix akka-remote-tests multi-jvm compile errors

akka-stream-tests/test:scalafix

Fix test:akka-stream-tests

Crude implementation of ByteString.map

scalafix akka-actor-typed, akka-actor-typed-tests

akka-actor-typed-tests compile and succeed

scalafix akka-camel

scalafix akka-cluster

akka-cluster compile & test

scalafix akka-cluster-metrics

Fix akka-cluster-metrics

scalafix akka-cluster-tools

akka-cluster-tools compile and test

scalafix akka-distributed-data

akka-distributed-data fixes

scalafix akka-persistence

scalafix akka-cluster-sharding

fix akka-cluster-sharding

scalafix akka-contrib

Fix akka-cluster-sharding-typed test

scalafix akka-docs

Use scala-stm 0.9 (released for M5)

akka-docs

Remove dependency on collections-compat

Cherry-pick the relevant constructs to our own
private utils

Shorten 'scala.collections.immutable' by importing it

Duplicate 'immutable' imports

Use 'foreach' on futures

Replace MapLike with regular Map

Internal API markers

Simplify ccompat by moving PackageShared into object

Since we don't currently need to differentiate between 2.11 and

Avoid relying on 'union' (and ++) being left-biased

Fix akka-actor/doc by removing -Ywarn-unused

Make more things more private

Copyright headers

Use 'unsorted' to go from SortedSet to Set

Duplicate import

Use onComplete rather than failed.foreach

Clarify why we partly duplicate scala-collection-compat
2019-01-11 12:27:18 +01:00
kerr
bdc90052aa Update headers from 2018 to 2019 once for all. (#26165)
* Add CopyrightHeader support for sbt-boilerplate plugin.
* Add CopyrightHeader support for `*.proto` files.
* Add regex match for both `–` and `-` for CopyrightHeader.
* Add CopyrightHeader support for sbt build files.
* Update copyright from 2018 to 2019.
2019-01-02 11:55:26 +01:00
Helena Edelson
8a44fca087
Typed Distributed Data requires untyped Cluster #25746 (#26074)
Typed Distributed Data requires untyped Cluster [#25746](https://github.com/akka/akka/issues/25746)
2018-12-14 15:53:08 -05:00
kerr
e9fb3a020a Make use of scalafix to remove unused import. (#26019)
* =build Add scalafix to remote unused import.

* +build Add file ignore plugin for scalafix which support ignore files.
2018-12-05 08:30:21 +00:00
Christopher Batey
14377ae8cf Add additional java api for updated for ORMap (#25926)
* Add additional java api for updated for ORMap

Existing updated is ambiguous from Java with the Scala API.

* Remove warnings from DurablePruningSpec
2018-12-04 14:51:41 +01:00
Johan Andrén
f66ee1cbe8
Handle lost typed receptionist removals #24887
Keep track of removed actors and re-remove them when ORMultiMap conflict has reintroduced them
2018-11-09 10:58:18 +01:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
Patrik Nordwall
61e7365678 Revert Support for rolling upgrade of ORSet[ActorRef], #25336
This reverts commit b72312d428.
2018-09-11 15:15:36 +02:00
Patrik Nordwall
116dbadda7 Mima latest version 2.5.16 2018-09-10 15:37:21 +02:00
Johan Andrén
60e95557be Mima filters 2018-08-28 17:25:20 +02:00
Johan Andrén
18b2d85216 Allow BigInt/BigInteger increments/decrements for PNCounter #25543 2018-08-28 16:24:06 +02:00
Patrik Nordwall
d5b2aea176
Merge pull request #25035 from piotrromanski/wip-fix-math-abs-usage
Handle a negative value returned by Math.abs()
2018-08-27 16:29:32 +02:00
Kazuhiro Sera
482eaea122 Fix several minor typos detected by github.com/client9/misspell (#25448)
* Fix several minor typos detected by github.com/client9/misspell

* Revert s/erminater/erminator/ in /ActorSystemSpec
2018-08-21 11:02:37 +09:00
kenji yoshida
5b3b191bac Remove procedure syntax (#25362) 2018-07-25 13:38:27 +02:00
Patrik Nordwall
ebbdb6135e Harden ReplicatorDeltaSpec, #25342
* It was a timing race condition in the test that was exposed
  by the change in PR #25315. Full state is now sent immediately
  when receiving the DeltaNack and that makes the Update complete
  much faster for that case than before.
* That resulted in that the delta propagations from previous
  updates were still in the buffer to be sent out when the
  incr(4) was performed. Those deltas contained the NoDeltaPlaceholder,
  which caused the inrc(4) delta to also be folded into NoDeltaPlaceholder
  and thereby not propagated.
* Before the DeltaNack the buffer had time to be flushed before the incr(4)
  and therefore no NoDeltaPlaceholder.
2018-07-12 10:05:06 +02:00
Patrik Nordwall
180ef934bc Improve performance of DData delta updates, #25310
* Use deterministic order of the target nodes for the writes when
  type RequiresCausalDeliveryOfDeltas, otherwise the random pick
  of targets caused that delta sequence numbers were missing for
  susequent updates
* Resend immediately when receiving DeltaNack instead of waiting
  for timeout. DeltaNack can happen when there are multiple
  concurrent updates from same node because each starts a WriteAggregator
  and a later Update might bypass an earlier
2018-07-11 13:14:25 +02:00
Patrik Nordwall
b72312d428 Support for rolling upgrade, #23703 2018-07-10 20:54:58 +02:00
Patrik Nordwall
f754705c9c Optimized serializer for ORSet[ActorRef], #23703
* ORSet[ActorRef] is used by Akka Typed receptionist
* and similar for GSet[ActorRef]

ORSetSerializationBenchmark
2018-07-10 20:54:51 +02:00