Commit graph

22883 commits

Author SHA1 Message Date
Patrik Nordwall
b48938f4a0
Improve default shard rebalancing algorithm, #26012 (#26101)
* Improve default shard rebalancing algorithm, #26012

* Use rebalance-threshold=1 because it will give the best distribution,
  and previous default could result in too large difference between nodes
* Off by one error, difference > threshold vs >=
* Added more unit tests
* Note that in some cases it may still not be optimal, stopping more
  shards than necessary, but a different strategy that looks at more
  than most and least is out of scope for this issue. In practise
  those cases shouldn't matter much.
* Also note that the rebalance interval is by default 10 seconds,
  so typically shards will start up before next rebalance tick.
  It's intentionally a slow process to not cause instabilities by
  moving too much at the same time.
2018-12-21 13:39:41 +01:00
Patrik Nordwall
5f409c17e0 clarify docs of ActorTestKit.stop, #24165 2018-12-21 12:53:18 +01:00
Patrik Nordwall
5621899bb6 unidoc genjavadoc doesn't work with sbt 1.2.7 yet (#26150) 2018-12-21 12:01:44 +01:00
Michael Kholodov
220021b87f Akka-typed-testkit: Provides a way of stopping actors #24165
* Added ActorTestKit#stop method and corresponding tests.
* Added 'Stopping actors' section to the docs
* Stop actor now waits until the actor terminates.
2018-12-21 11:37:34 +01:00
Patrik Nordwall
6d6ac21f30
Merge pull request #26142 from nvollmar/wip-26141-fix-backoff-supervisor
Fixes final stop message handling #26141
2018-12-21 11:17:51 +01:00
Helena Edelson
d74426a255 Rename akka.actor.typed.ActorContext #25734 (#26146) 2018-12-21 11:17:26 +01:00
Patrik Nordwall
cc738def48
Merge pull request #26147 from marcospereira/patch-1
Cross run MiMa when releasing
2018-12-21 11:14:29 +01:00
Marcos Pereira
03e4ffb3d1
Cross run MiMa when releasing
This ensures the binary compatibility will run for all Scala 
versions that are used to do the release.
2018-12-20 17:41:53 -05:00
Helena Edelson
408fab3313
Fix compiler warnings in akka-remote, akka-actor-typed. (#26139)
Fix compiler warnings in akka-remote, akka-actor-typed. (#26139)
2018-12-20 09:10:54 -08:00
Nicolas Vollmar
82379893f3 Fixes final stop message handling #26141 2018-12-20 07:38:24 +01:00
kerr
15e2527629 Deprecate resolveOneCS which accept FiniteDuration. (#26067) 2018-12-19 14:54:22 +01:00
Karel Čemus
e8403f0493 Slf4jLogger expects also null as a marker to support Warning4 events (#26055) 2018-12-19 12:07:42 +01:00
Renato Cavalcanti
2644b0e463 swap config and DNS in aggregate example (#26131) 2018-12-19 11:41:04 +01:00
mszczygiel
10e985526d improved message in case all DNS resolvers fail #26097 2018-12-19 11:40:28 +01:00
Renato Cavalcanti
5bcfbc556c removes warning about shadowed java.io.File (#26134) 2018-12-19 11:39:09 +01:00
kerr
86a9595bf0 Add dedicated exception when try to stop self with ActorContext#stop in Akka typed. (#26081) 2018-12-19 09:55:04 +01:00
Tim Moore
c2dd5ef759 Refactor PersistentActorJavaDslTest (#25728)
* Move empty state and increment logic into the State class

* Improve types in tapPersistentActor

* Extract CounterBehavior class

Tests override functionality as needed to make assertions.

* Use singleton enum pattern from Effective Java

This ensures that serialization/deserialization is handled correctly.

* Extract command handler methods from lambdas

* Inline special event values

This makes it easier to understand what it's doing.
2018-12-18 21:42:28 +01:00
Arnout Engelen
bf3bc4d6e1
Remove CallerSensitive (#26112)
Having this file at all was a workaround for a problem with building on jdk9
for jdk8, but I can no longer reproduce this problem.

See also https://github.com/akka/akka/pull/25326
2018-12-18 15:56:09 +01:00
RomanIakovlev
4055a42899 Update the typed cluster sharding documentation to use new terminology #26120
EventSourcedEntity instead of PersistentEntity
2018-12-18 15:47:10 +01:00
James Roper
762c9cb019 Async DNS search domain support (#25987)
Fixes #25825

Provides search domain support for Async DNS.

There are two parts here, first is the search domain support itself,
which is relatively straight forward - on lookup, create a list of hosts
to attempt to resolve based on the search domains configuration
(including the host with no postfix), exclude all those hosts that have
less dots than the configured ndots, and then search until you find one
that returns any records. In this case the search domains are applied for
each nameserver attempt, so if a particular nameserver times out, it
won't attempt to search any more domains on that nameserver.

The second part is in actually detecting the system configuration. I've
only implemented partial support here, it reads /etc/resolv.conf, and
nothing else. There are ways to detect it on other platforms, there are
also environment variables that are supposed to be honored on Linux and
other *nix's, but to keep this change manageable, I've focussed on just
supporting the minimum to meet the Kubernetes service discovery use case,
and documented the limitations.
2018-12-17 17:42:20 +01:00
Arnout Engelen
81b499cc7b
Scalafix followup:different fix alias on different sub projects with packages ignore support. (#26084)
* Setup different fix alias on different sub projects and add support to ignore dedicated packages when do scalafix.

Because some sub projects does not enable the MultiNode plugin.

Add ignore packages support for scalafix.

* Run scalafix to remove unused imports again.

* Add `reload` to `fixall` and `fix` command alias.
2018-12-17 17:40:45 +01:00
Patrik Nordwall
5deaacbf94 more api may change warnings in Typed docs (#26124) 2018-12-17 17:39:59 +01:00
hepin1989
41f70ea849 Add reload to fixall and fix command alias. 2018-12-17 21:10:11 +08:00
hepin1989
c38a5dcf9c Run scalafix to remove unused imports again. 2018-12-17 21:10:11 +08:00
hepin1989
746d0adb45 Setup different fix alias on different sub projects and add support to ignore dedicated packages when do scalafix.
Because some sub projects does not enable the MultiNode plugin.

Add ignore packages support for scalafix.
2018-12-17 21:10:11 +08:00
Adrien Mannocci
82dea881ce Optimize compact during framing (#25902) 2018-12-17 12:46:38 +01:00
Helena Edelson
7e614a595f
Fix compiler warnings akka-actor (#26095)
[# 26089](https://github.com/akka/akka/issues/26089)
2018-12-14 17:48:08 -05: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
2c145cd3c3 Clarify migration from old akka management discovery (#26102) 2018-12-13 11:57:59 +01:00
Patrik Nordwall
567f8a15e0
Merge pull request #26073 from hepin1989/patch-8
Add description about default method parameters.
2018-12-12 10:29:00 +01:00
Dávid István Bíró
3a6e539ce3 Fix log args to actually show the forwarded message (#26053)
* Fix log args to actually show the forwarded message

* remove message from forwarding log
2018-12-12 10:27:24 +01:00
Josep Prat
a31964475e Add forgotten expectNoMessage method in StreamTestKit (#26070)
* Add forgotten `expectNoMessage` method in StreamTestKit

As discovered during https://github.com/akka/akka-http/pull/2292#discussion_r239473817 the parameterless version of `expectNoMessage` in StreamTestKit is missing.
2018-12-12 10:25:29 +01:00
Dale Wijnand
74ee90d52d Introduce Behavior#unsafeCast (asInstanceOf alt) (#26093)
* Remove some unnecessary casts in WithMdcBehaviorInterceptor

* Reuse Behavior.same & Behavior.unhandled

* Introduce Behavior#unsafeCast (asInstanceOf alt)

Also introduce StoppedBehavior#cast, as a local, safe alternative.
2018-12-11 15:56:01 +01:00
Patrik Nordwall
e34a4859e5
Merge pull request #26106 from renatocaval/load-discovery-scaladoc
updated scaladoc for loadServiceDiscovery
2018-12-11 15:48:00 +01:00
Renato Cavalcanti
7310992583 updated scaladoc for loadServiceDiscovery 2018-12-11 14:44:03 +01:00
Patrik Nordwall
ed78c183dc
Merge pull request #26096 from akka/fixLagomLink
Fix link to lagom
2018-12-11 11:38:23 +01:00
Patrik Nordwall
229db51eb4 Cleanup validNodeForGossip (#25965)
The intended behavior is:
* don't gossip to node marked as unreachable by self (heartbeat
  messages are not getting through so no point in trying to gossip).
* gossip is allowed to nodes marked as unreachable by others

This doesn't change anything from how it worked before, but I think the
original intention before the multi-dc changes was to not gossip to
unreachable at all no matter who marked them.
2018-12-10 17:18:53 +01:00
Arnout Engelen
b40d28b885
Fix link to lagom 2018-12-10 15:52:38 +01:00
balteo
24ff2b80e7 Fix broken link to lagom framework (#25844) 2018-12-10 15:51:18 +01:00
Patrik Nordwall
44c618cce0
Merge pull request #26075 from chbatey/2519mima
update mima latet version for 2.5.19
2018-12-10 13:59:17 +01:00
Patrik Nordwall
20f7acb34d
Merge pull request #26091 from dwijnand/reuse-scala.reflect.classTag-and-ClassTag.Nothing
Reuse scala.reflect.classTag & ClassTag.Nothing
2018-12-10 13:46:26 +01:00
Patrik Nordwall
3916ef382e
Merge pull request #26092 from dwijnand/give-BackoffSupervisor-an-O-outer-msg-type-param
Give BackoffSupervisor an "O" outer msg type param
2018-12-10 13:42:52 +01:00
Patrik Nordwall
8fd4cb5298
Merge pull request #26094 from dwijnand/use-OptionVal-over-null-in-typed-TimerSchedulerImpl/TimerInterceptor
Use OptionVal over null in typed TimerSchedulerImpl/TimerInterceptor
2018-12-10 13:30:49 +01:00
Aleksei Molokovskikh
4fe5b1cb59 fixed deprecated method in getting started guide (#26083) 2018-12-10 10:45:24 +00:00
Dale Wijnand
9f102813b6 Remove typed.ActorRef#sorry/sorryForNothing (#26090)
These were unsafe (despite the lying commnet) & unused.
2018-12-10 10:44:37 +00:00
Dale Wijnand
384c92dc89
Use OptionVal over null in typed TimerSchedulerImpl/TimerInterceptor 2018-12-09 22:57:05 +00:00
Dale Wijnand
a1ed1d3215
Give BackoffSupervisor an "O" outer msg type param
This begins to reintroduce some typesafety into BackoffSupervisor, using
the necessary cast internally where this isn't honoured.
2018-12-09 22:07:46 +00:00
Dale Wijnand
fc4b1238f4
Reuse scala.reflect.classTag & ClassTag.Nothing 2018-12-09 22:07:26 +00:00
Christopher Batey
58df72330d update mima latet version for 2.5.19 2018-12-07 16:13:11 +00:00
kerr
a2590db3f5 Add description about default method parameters. 2018-12-07 18:28:03 +08:00