Commit graph

1508 commits

Author SHA1 Message Date
Patrik Nordwall
f6ceb4d49a
Flush messages before DeathWatchNotification, #28695 (#28940)
* Since DeathWatchNotification is sent over the control channel it may overtake
  other messages that have been sent from the same actor before it stopped.
* It can be confusing that Terminated can't be used as an end-of-conversation marker.
* In classic Remoting we didn't have this problem because all messages were sent over
  the same connection.

* don't send DeathWatchNotification when system is terminating
* when using Cluster we can rely on that the other side will publish AddressTerminated
  when the member has been removed
* it's actually already a race condition that often will result in that the DeathWatchNotification
  from the terminating side
  * in DeathWatch.scala it will remove the watchedBy when receiving AddressTerminated, and that
    may (sometimes) happen before tellWatchersWeDied

* same for Unwatch
* to avoid sending many Unwatch messages when watcher's ActorSystem is terminated
* same race exists for Unwatch as for DeathWatchNotification, if RemoteWatcher publishAddressTerminated
  before the watcher is terminated

* config for the flush timeout, and possibility to disable
2020-07-03 09:54:35 +02:00
Johan Andrén
1e9e984727
Removing, deprecating and replacing usage of black/whitelist (#29254) 2020-06-18 15:48:28 +02:00
Patrik Nordwall
b80cd745eb
Allow update from Lightbend SBR in ClusterReceptionistConfigCompatChecker (#29209)
* and don't allow different strategies
2020-06-10 12:47:16 +02:00
Patrik Nordwall
cd9e9e960a Telemetry SPI hooks for SBR decision, #29085 2020-05-28 08:52:22 +02:00
Patrik Nordwall
1472bd9e8c Log markers for SBR, #29085 2020-05-27 14:26:55 +02:00
Patrik Nordwall
7c77617d18
Merge pull request #29092 from akka/wip-29034-sharding-watch-patriknw
Allow ShardCoordinator to watch old region ActorRef that is not in cluster, #29034
2020-05-27 10:06:38 +02:00
Patrik Nordwall
c45e6ef39b
Add Lightbend's SBR to Akka Cluster, #29085 (#29099)
* change package name to akka.cluster.sbr
* reference.conf has same config paths
* akka.cluster.sbr.SplitBrainResolverProvider instead of com.lightbend.akka.sbr.SplitBrainResolverProvider
* dependency from akka-cluster to akka-coordination, for lease strategy
* move TestLease to akka-coordination and use that in SBR tests
* remove keep-referee strategy
* use keep-majority by default
* review and adjust reference documentation

Co-authored-by: Johan Andrén <johan@markatta.com>
Co-authored-by: Johannes Rudolph <johannes.rudolph@gmail.com>
Co-authored-by: Christopher Batey <christopher.batey@gmail.com>
Co-authored-by: Arnout Engelen <github@bzzt.net>
2020-05-25 12:21:13 +02:00
Patrik Nordwall
228c19e688 Allow ShardCoordinator to watch old region ActorRef that is not in cluster, #29034
* Otherwise the remote watch is disabled and the old region ActorRef remains
  in the coordinator's state
2020-05-19 13:53:42 +02:00
kerr
bada816714
=build Fix commandAlias for fixall and sortImports (#28984)
* =build Fix commandAlias for fixall and sortImports

* =build Update sortImports to 0.5.0

* Sort imports to handle `javax`.

* fx
2020-05-11 11:47:33 +02:00
Patrik Nordwall
d2afff6bfc
update protobuf 3.11.4
* supposed to be more native image friendly for Cloudstate
2020-05-06 11:05:30 +02:00
kerr
0e4d41ad33
+build Add sort imports support. (#28780)
* Add scalafix plugin for jdk 9.
* Add command alias sortImports.
* Excludes some sources from SortImports.
* Update SortImports to 0.4.0
* Sort imports with `sortImports` command.
2020-04-27 14:32:18 +02:00
ohze.net
ea7205eaf7
dotty phase 2: scalafix ExplicitNonNullaryApply (#28949)
* scalafix ExplicitNonNullaryApply prepare

+ Temporarily use com.sandinh:sbt-scalafix because scalacenter/scalafix#1098
+ Add ExplicitNonNullaryApply rule to .scalafix.conf
+ Manually fix a NonNullaryApply case in DeathWatchSpec that cause
  `fixall` fail because ExplicitNonNullaryApply rule incorrectly rewrite
  `context unbecome` to `context unbecome()` instead of `context.unbecome()`

* scalafix ExplicitNonNullaryApply

fix by enabling only ExplicitNonNullaryApply rule in .scalafix.conf then:
```
% sbt -Dakka.build.scalaVersion=2.13.1
> fixall
```

* scalafmtAll

* Revert to ch.epfl.scala:sbt-scalafix

Co-authored-by: Bùi Việt Thành <thanhbv@sandinh.net>
2020-04-27 12:31:16 +02:00
Bùi Việt Thành
02b9b30354 scalafix ExplicitResultTypes - for implicit members 2020-04-20 17:59:50 +07:00
Bùi Việt Thành
4df76d6bce scalafix FinalObject 2020-04-20 17:59:49 +07:00
Johan Andrén
7e900bab1b
Step two in the cluster message manifest change #13654 2020-04-03 10:36:31 +02:00
Patrik Nordwall
bf6576ce79
remove test config of old flight recorder (#28800) 2020-03-25 13:32:19 +01:00
Helena Edelson
6fe2f66adc
Multi node test hardening for Sharding #27749 (#28631) 2020-02-27 12:05:55 -08:00
Yury Gribkov
94bebb330a
Introduce the onReceiveTimeout hook for SeedNodeProcess (#28646) 2020-02-25 14:06:44 -08:00
Johan Andrén
b1699b026e First step of rolling update cluster serlializer no classmanifests (#28514)
* First step of rolling update for cluster serlializer to not use class manifests #13654

* Test coverage

* A bit of mima excludes makes jenkins a happy butler

* Docs mention
2020-01-27 12:58:40 +01:00
Mikhail Limansky
c23e3a53dd Fix compile error in multi-jvm test 2020-01-13 13:27:30 +03:00
Mike Limansky
d9ed927df0 Update to ScalaTest 3.1.0, fix #28289. 2020-01-11 15:15:10 +03:00
Johan Andrén
ed1f107ab1
Re enable stress spec artery #28344 2020-01-08 16:24:28 +01:00
Helena Edelson
6bf20f4117 Update all copyright headers to 2020 after new year's #27881 (#28434) 2020-01-02 13:24:59 +01:00
Patrik Nordwall
2c15c8d753
Merge pull request #28401 from akka/wip-28393-reachable-log-patriknw
fix wrong logging of REACHABLE, #28393
2019-12-19 14:02:14 +01:00
Brian Wignall
fd41299943 Fix typos, via a Levenshtein-style corrector 2019-12-19 01:57:55 -05:00
Patrik Nordwall
d5da313a4b fix wrong logging of REACHABLE, #28393 2019-12-18 10:59:56 +01:00
Helena Edelson
9e0fd9451c Refactor First and Join seed node processes to shared logic for dry and logic hardening (#28379) 2019-12-16 15:18:24 +01:00
Johannes Rudolph
702b6a7f41 actor: allow seamless access to untyped extensions given typed ActorSystem (#28294)
* actor: allow seamless access to untyped extensions given typed ActorSystem

* add overrides with concrete type for Java API everywhere
2019-12-05 16:01:22 +01:00
Patrik Nordwall
f2b78a728a mima filter for ClusterLogger, #28207
* wasn't noticed in pr validation because mima settings were wrong
2019-12-05 13:18:32 +01:00
Patrik Nordwall
89165badbb
Structured log events, #28207 (#28209)
* Expanding the LogMarker to optionally include Map of additional
  properties
* The name of the marker shows up as `tags` in Kibana
* The properties of the LogMarker are included as MDC entries, which
  Logstash encoder automatically understands
* Implemented with classic eventStream logging so that it can be used
  from all places without dependencies to Slf4j
  * also means that it's possible to subscribe to LogEventWithMarker
    to consume these events via the eventStream
* move marker definitions to RemoteLogMarker and ClusterLogMarker
* marker for dead letters
* marker for leader detained/allowed
* marker for member status changed
* markers for shard allocated and started
* test LogMarker with properties in Slf4jLoggerSpec
* doc note of the LogMarker definitions
2019-12-05 11:36:21 +01:00
Patrik Nordwall
82db446bb7 Don't loadExtensions at startup if already terminated, #27840 (#28248)
* Problem could be recreated with DowningProviderSpec when running
  with -Dakka.remote.artery.enabled=off
* The exception from the downing provider caused cluster shutdown
  followed by CoordinatedShutdown and ActorSystem.finalTerminate
* The ActorSystem had still not fully initialized so it tried to
  load the configured extensions and the SystemMaterializer extension
* SystemMaterializer can't create child actor
* The thrown exception isn't wrong but might be confusing
* Skip loading extensions if ActorSystem already terminated
* The reason for different behavior with Artery and classic remoting
  is that Artery inits the SystemMaterializer earlier
2019-11-26 11:44:37 +01:00
Christopher Batey
bc2d3aa4db Use embedded media driver for StressSpec (#27037)
* Use embedded media driver for StressSpec

The current setup starts a media driver for each JVM in the same
directory which is caused the cnc file to be courruped in some way
so that the client in Akka timed out waiting for it to be initialized.

This test is disabled for Artery, see
https://github.com/akka/akka/issues/21810 so all it does is startup
and then end the test right away.

Will look at enabling the test again separately.

Fixes #27030
2019-11-25 16:58:58 +01:00
Johan Andrén
8c5a0fac8e StreamRefs spec fail (#28018)
* Wrong timeout used for subscription timeout

(cherry picked from commit 05098eef1d9ecdbb5f0c8c5cda29aa1890ddc9e6)
2019-10-17 08:55:03 +02:00
Patrik Nordwall
5de5dec6ee
Merge pull request #27988 from akka/wip-protobuf-3.10.0-patriknw
Update protobuf-java and protoc to 3.10.0
2019-10-15 11:09:30 +02:00
Patrik Nordwall
4e8a5d333b
More structured logger names, #27922 (#27934)
* some cluster logging improvements
* most logger names are actually good, when using ActorLogging since
  config can be setup on the package (prefix)
* override logSource when StageLogging is used
* replace system.log with more specific logger
2019-10-14 17:55:12 +02:00
Scala Steward
63df007685 protoc version 3.10.0 2019-10-14 11:11:21 +02:00
Patrik Nordwall
bb6d6365b1
Scaladoc improvements (#27929)
* private[akka] visibility on some internal classes
  * found via unidoc
* fix Scaladoc links
2019-10-10 14:17:01 +02:00
Patrik Nordwall
7173275ba4 Revert "Harden DowningProviderSpec, and detect terminated before initialized, #27840"
This reverts commit f2466cad49f0eb413d74532af205aa34a4386505.

* and temporary pending of DowningProviderSpec
2019-10-08 17:40:50 +02:00
Patrik Nordwall
e350a7b71a Harden DowningProviderSpec, and detect terminated before initialized, #27840 (#27911)
* better error reporting if ActorSystem is terminated before it has been
  fully initialized
* handle exception in DowningProviderSpec
2019-10-08 13:53:57 +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
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
c0099b728e
Merge pull request #27733 from johanandren/wip-26392-StreamRefSpec-failure
Eliminate race in multi node StreamRefSpec
2019-09-19 11:25:12 +02:00
Johan Andrén
60a6e9bf5b Eliminate race in multi node StreamRefSpec #26392 2019-09-17 15:42:22 +02:00
Patrik Nordwall
bbf9e7c617
Merge pull request #27670 from akka/wip-24955-multi-dc-events-patriknw
Avoid publication of duplicate UnreachableDataCenter, #24955
2019-09-16 13:59:17 +02:00
Arnout Engelen
e6859253e5 Update to MiMa 0.6.0 (#27558) 2019-09-11 11:28:12 +02:00
Patrik Nordwall
cf4c954009 Avoid publication of duplicate UnreachableDataCenter, #24955
* see scenario in added test, extracted from debug logs "New gossip published"
  from MultiDcSplitBrainSpec
* it publised UnreachableDataCenter even though it had already published that,
  when a new cross link is added as unreachable in the reachability table
* don't know why the implementation of diffUnreachableDataCenter/isReachable was
  so complicated, but no tests are failing for the changed implementation
2019-09-10 10:29:13 +02:00
Johan Andrén
66280846c1 StreamRefs cancellation behavior #27639
* Updated multi-jvm test
* Updated migration guide
2019-09-06 08:55:51 +02:00
Patrik Nordwall
4edbcde280 fix deprecation warning for protobuf enum 2019-09-05 19:32:15 +02:00
Johan Andrén
b68d67008a
Deprecate actor materializer (#27538) 2019-09-05 16:08:37 +02:00