Commit graph

112 commits

Author SHA1 Message Date
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
cd877e126f
Typed receptionist clashes with the clusterclient receptionist #26848 2019-05-09 12:59:45 +02:00
Patrik Nordwall
2bbf13f707
Run CoordinatedShutdown from ActorSystem.terminate #25213 (#26830) 2019-05-03 10:47:47 +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
Patrik Nordwall
a5e9741d35 replace unicode arrows again (#26732) 2019-04-15 15:40:26 +00:00
Christopher Batey
5a81e973b4 Make compilation options for akka typed modules strict (#26565) 2019-04-04 10:58:21 +02:00
Tzu-Chiao Yeh
7cc6266ad0 Change typed whenTerminated signature to Future[Done], #25647
This change ignore the terminated passed from untyped and map it into Done,
with some minor changes for testing termination.

termiate() returns Unit to not bias it towards the Scala API, completion
can be observed with whenTerminated or getWhenTerminated
2019-04-01 09:09:38 +02:00
Patrik Nordwall
725728f346 cleanup Receptionist example 2019-03-28 16:14:23 +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
Patrik Nordwall
076b16485b fix typed ActorSystemSpec #26614 2019-03-27 08:30:42 +01:00
Arnout Engelen
b214115051
Update scalatest 2019-03-19 11:25:48 +01:00
Vasilis Nicolaou
4a04eddf7d give cached value back in ddata sample(#26476) 2019-03-19 08:06:26 +01:00
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00
Patrik Nordwall
48a43e1e74 Issue references to FIXMEs in Typed (#26513)
* Issue references to FIXMEs in Typed

* comment out ctx.ask example with 2 param

* doesn't compile with 2.13, separarate issue created
2019-03-14 10:07:08 +01:00
Patrik Nordwall
eb5dd7d297 fix wrong headers 2019-03-11 16:58:55 +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
Johan Andrén
9fc3251a03 Update test and sample usages of ActorRef.? to .ask 2019-02-21 13:55:14 +01:00
Seth Tisue
fc23f03031 upgrade to latest ScalaTest (#26387)
stuff moved to a new package. you wouldn't expect that in a point
release, but they put type aliases in place so Scala users wouldn't
notice. but the change is visible to Java code.

the upgrade is not strictly necessary, but it would be convenient
for the Scala 2.13 community build to have this merged, so I don't
have to maintain these changes in our Akka fork
2019-02-17 19:45:39 +00:00
Johan Andrén
8fabb73f2b Make the AbstractBehavior builder mutable (#26309)
* Make the AbstractBehavior builder mutable #26260

* Use mutable builder style in first sample, mention that fluent is an option

* A bit of rework of the Java builders:

 * onAnyMessage added
 * use the japi SAMs throughout in the APIs
 * avoid wrapping the japi functions in Scala functions for the most common cases
 * more Java test coverage

* Not just any exception

* Works on 2.11 as well as 2.12
2019-02-12 15:38:35 +01:00
Johan Andrén
84e8e41193
Logger class for typed actors #25677
* Walk stack to figure out logger class
* User API for getting a customized logger
* API to set logger class, use in receptionists, auto-good-class for EventSourcedBehavior
2019-02-11 17:18:17 +01:00
Patrik Nordwall
31b700fb7b support nested restart and backoff supervision strategies
* problem found by new EventSourcedBehaviorStashSpec
* added tests of this in SupervisionSpec
* the scheduled ScheduledRestart and ResetRestartCount need an
  owner field so that they can be passed on if not scheduled by
  the strategy instance itself
2019-01-18 17:47:52 +01:00
Christopher Batey
ae39edc5a5 Increase patience for ReceptionistExampleSpec
* Increase patience for ReceptionistExampleSpec

This test doesn't extend AkkaSpec doesn't pick up the larger patience
for other tests

* Remove unused examples from example specs

* Formatting
2019-01-15 15:36:55 +01:00
Patrik Nordwall
f4defb139b
use receiveOne instead of receiveMessageType, #25914
* use receiveOne instead of receiveMessageType, #25914

* when the type is the same as the probe's type

* formatting

* rename receiveOne to receiveMessage

* rename receiveN to receiveMessages

* have to use different name in javadsl so that became receiveSeveralMessages
2019-01-15 09:23:30 +01:00
Helena Edelson
5514afbe54
Fix compiler warnings in akka-cluster* #26087 (#26241)
* Fix compiler warnings in akka-cluster* #26087
* Added new mima filters for 2.5.19 bin compat.
2019-01-14 05:50:59 -08:00
hepin1989
998c5a9285 Formatting java codes with sbt-java-formatter. 2019-01-12 04:00:53 +08:00
kerr
0848a5c02c Import akka.actor as untyped but not a. (#26079) 2019-01-07 14:45:51 +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
hepin1989
c38a5dcf9c Run scalafix to remove unused imports again. 2018-12-17 21:10:11 +08: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
Christopher Batey
da71e2044e
Allign typed singleton with typed sharding (#26013)
* Allign typed singleton with typed sharding

* Singleton class for setting proerties
* Make stop message optional

Closes #25670
2018-12-06 16:26:38 +00:00
Helena Edelson
dbfe6f38c7 Rename PersistentBehavior (#25721)
Migrated InternalProtocol with least refactor changes, in the end.
2018-12-05 12:05:59 +01: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
b38b407c73
Typed sharding: Allow queying of local shard region (#25409)
* Typed sharding: Allow quering of local shard region

Partially addresses #24466 still need to query
all shard regions

* Update to new testkit
2018-12-04 15:53:07 +00: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
Patrik Nordwall
3ccc67b3d6
Merge pull request #25812 from akka/wip-25706-thenRun-patriknw
align Effect API between scaladsl and javadsl, #25706
2018-11-06 16:09:39 +01:00
Patrik Nordwall
a948f5572b align Effect API between scaladsl and javadsl, #25706
scaladsl:
* stop => stop()
* andThenStop() => thenStop()

javadsl:
* andThen => thenRun
2018-11-06 15:02:08 +01:00
Arnout Engelen
079aa46733 Introduce 'MemberDowned' member event (#25854)
* Introduce 'MemberDowned' member event

Compatiblity note: MemberEvent is a sealed trait, so it is debatable whether
it is acceptable to introduce a new member.

* Be more conservative (more like leaving), add test
2018-11-05 10:03:06 +00:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
Patrik Nordwall
abb3429bc8
Merge pull request #25804 from akka/wip-25750-AbstractBehavior-patriknw
Rename MutableBehavior to AbstractBehavior, #25750
2018-10-18 13:16:48 +02:00
Patrik Nordwall
4131036a12
PersistenceId type to differentiate between persistenceId and entityId, #25703 (#25704)
* PersistenceId type to differentiate between persistenceId and entityId, #25703

* both entityId (for sharding) and persistenceId as String types was easy
  mix-up
* utility method in EntityTypeKey to concatenaty the type and entityId to
  a unique persistenceId

* support custom separator to enable compatilbility with Lagom's javadsl
2018-10-17 13:53:50 +02:00
Patrik Nordwall
ad3ad15747 Rename MutableBehavior to AbstractBehavior, #25750
* Also cleanup javadsl Receive, which is only used from AbstractBehavior
* Clarify further in docs that the functional vs OO style is a matter of taste
2018-10-17 08:53:37 +02:00
Patrik Nordwall
d71ba251ed make java sample code independent of Scala (#25800)
* need this for gathering and compiling java sources (in IDE),
  https://github.com/patriknw/akka-compile-ide-java
2018-10-16 13:52:54 +01:00
Johan Andrén
b0de255d27 Docs for typed distributed data (#25747)
* Typed distributed data docs shaping up
2018-10-12 08:14:01 +01:00
Patrik Nordwall
d9af08757e rename PersistentBehaviors.receive to PersistentBehavior.apply 2018-10-09 13:47:22 +02:00
Christopher Batey
2045a0fbf7 Clarify supervision of singleton actors (#25681)
* Clarify supervision of singleton actors
* Document supervision for typed singletons
2018-10-08 14:42:18 +02:00
Arnout Engelen
e822b69f82 Specify the artery port '0' to avoid address already in use 2018-10-02 15:30:41 +02:00
Patrik Nordwall
6d8d646fe5
Merge pull request #25539 from akka/wip-25480-sharding-start-patriknw
Simplify signature of ClusterSharding.spawn, #25480
2018-09-21 14:21:33 +02:00
Johan Andrén
a8cfe1e0ff
Merge pull request #25654 from johanandren/wip-25620-remove-typed-persistence-ctx-param-johanandren
Remove the ActorContext parameter from the scaladsl command handler
2018-09-21 13:51:09 +02:00