Commit graph

1415 commits

Author SHA1 Message Date
Christopher Batey
65ccada280 Lease API + use in cluster singleton and sharding, #26480 (#26629)
* lease api
* Cluster singleton manager with lease
* Refactor OldestData to use option for actor reference
* Sharding with lease
* Docs for singleton and sharding lease + config for sharding lease
* Have ddata shard wait until lease is acquired before getting state
2019-03-28 13:31:56 +01:00
Ignasi Marimon-Clos
c097e8144a Extends collection of shutdown Reasons (e.g. ClusterJoinUnsuccessfulReason) (#26570)
* Adds JoiningSeedNodesUnsuccessfulReason

* Promotes IncompatibleConfigurationDetectedReason to public API

* Rename class after PR comments

* Use a custom exit code on joinUnsuccesful shuhtdown

* Mima

* Scalafmt
2019-03-26 14:52:50 +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
Patrik Nordwall
e0a3fb28c9
Merge pull request #26346 from akka/wip-26326-FunctionRef-deadlock-patriknw
Fix deadlock in FunctionRef, #26326
2019-02-12 15:56:28 +01:00
Patrik Nordwall
ddada9a8e1
Stop singleton and shards when self MemberDowned, #26336 (#26339)
* Stop singleton when self MemberDowned, #26336
  * It's safer to stop singleton instance early in case of downing.
  * Instead of waiting for MemberRemoved and trying to hand over.
* Stop ShardRegion when self MemberDowned, #26336
* Upper bound when waiting for seen in shutdownSelfWhenDown, #26336
2019-02-12 15:05:33 +01:00
Arnaud Burlet
93ce2b8696 Test to ensure a coordinated shutdown is successful when a stream involving StreamRefs is running 2019-02-12 15:03:49 +01:00
Patrik Nordwall
f0b976d557 fix wrong log level of cluster debug logging (#26351) 2019-02-11 16:24:08 +00:00
Patrik Nordwall
0c2ad78042 fix format of verbose logging of cluster events (#26363) 2019-02-11 14:37:39 +01:00
Christopher Batey
5e0bc91e34 Make cluster logging even more standard
A few cases the dc logging was inconsistent. The logger has changed in
some cases but only in cluster actors of which there are a single
instance
2019-02-05 16:29:30 +00:00
Patrik Nordwall
18daa47781
Merge pull request #25963 from akka/wip-25950-allObservers-patriknw
Reachability.allObservers wrong after filterRecords, #25950
2019-01-18 12:31:11 +01:00
Patrik Nordwall
96692b2c04
Terminate StreamRef on node failure, #25960
* manage AddressTerminated subscription in FunctionRef
* implementation can be compared with akka/actor/dungeon/DeathWatch.scala
* use synchronized access to the watch state and AddressTerminatedTopic
* use OptionVal for _watchedBy
2019-01-17 16:53:17 +01:00
Patrik Nordwall
7777cba0a6 Reachability.allObservers wrong after filterRecords, #25950 2019-01-14 20:42:08 +01:00
Patrik Nordwall
312dbad1b9 Suppress no seed-nodes configured logging when Bootstrap is used, #25680
* link to docs
2019-01-14 19:51:31 +01:00
Patrik Nordwall
19c9fbc355 cleanup Cluster logging
* include Cluster Node prefix in same way for all logging
2019-01-14 19:47:43 +01:00
Helena Edelson
00b235d9c5
Support rolling update for new JoinConfigCompatChecker #26194 (#26229)
Support rolling update for new JoinConfigCompatChecker #26194
2019-01-14 09:15:22 -08: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
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
Arnout Engelen
0cc8e20a2e
Various scala-2.13.0-M5 fixes
Clearer imports in TcpDnsClient

Accept SVG's when checking if diagrams were generated

Fix akka-actor MiMa issues

akka-testkit scalafix changes

Update scalatest to 2.13-released snapshot

akka-stream scalafix changes

Update ssl-config

To version that's released with -M5

Take elements directly out of buffer

Manually fix immutable.Seq / Doc link

Make sure the right Concat, Sink is imported

akka-stream binary compat

akka-stream-testkit scalafix

akka-actor-tests scalafix

Eta-expensions
2019-01-11 11:44:35 +01:00
Seth Tisue
67300e4122
isFinite has zero parameter lists now 2019-01-11 11:43:31 +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
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
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
c8013d54f3 Include configuration name in log when cluster not actor provider 2018-11-16 15:58:59 +00:00
Helena Edelson
f872115512 Cluster event listener that logs all events #25832 (#25918) 2018-11-15 17:31:58 +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
Patrik Nordwall
90bc4cfa3e
Improvements of singleton leaving scenario, #25639 (#25710)
* Testing of singleton leaving
* gossip optimization, exiting change to two oldest per role
* hardening ClusterSingletonManagerIsStuck restart, increase ClusterSingletonManagerIsStuck
2018-11-09 09:42:48 +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
Johannes Rudolph
655bef2e71 Fix typo in reference.conf (#25821) 2018-10-24 07:42:03 -04:00
Christopher Batey
ba67f71ca8 Treat MemberStatus.Removed as terminal state in ClusterReadView (#25499)
* Fixes #25489 where cluster event for a previous state can override
the call to cluster.close settings it to remove
* Fix case where Removed is used as a placeholder for unknown
2018-10-03 14:01:38 +02:00
Patrik Nordwall
a6737b5e42 Don't automatically down quarantined node, #25632 2018-09-24 14:05:13 +02:00
Johan Andrén
8ed4f5abab Undeprecate the config, add a note in cluster singleton 2018-09-04 14:21:25 +02:00
Patrik Nordwall
25079cb568
Support joining 2.5.9 or earlier, compat InitJoinAck, #25491
* Detect that joining node is 2.5.9 or earlier by empty ConfigCheck
  config in InitJoin message. Then send back Address, which was the
  old representation of InitJoinAck
* Include akka.version in logging to facilitate troubleshooting
2018-08-23 20:37:42 +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
Seeta Ramayya
61790d763d Improved logging when node joins itself #25279 2018-07-19 10:26:28 +02:00
Konrad `ktoso` Malawski
29f30a4a78 =clu Accept Welcome message from previous joinSeedNodeProcess #25295 (#25297)
* =clu Accept Welcome message from previous joinSeedNodeProcess #25295
2018-07-03 15:22:20 +01:00
Christopher Batey
ee7e699d23 Cluster sharding: Set waiting for state timeout for tests
Default is 5s which means if the first Read is lost and
a test ddata have any secondary nodes to query it'll
timeout waiting to get the state.

E.g. read being ignored due to loading durable state then
never gets retries
2018-07-02 12:50:29 +01:00
Roman Filonenko
502ff08df5 fix akka-cluster-tools compile error 2018-06-16 18:52:45 +02:00
Christopher Batey
28b86379c8 Harden MultiDcClusterShardingSpec (#25201)
- Use global multi node cluster config
- Reduce retry interval for ShardRegion register
- Add clue to unhelpful assert failing
2018-06-15 15:28:04 +02:00
Christopher Batey
01f90ad95d
Add common multi node cluster config to all cluster sharding tests (#25202) 2018-06-05 06:58:17 +01:00
Christopher Batey
1787283757 Log receiving of heartbeats when verbose heartbeat logging is on (#25183) 2018-06-04 16:22:06 +03:00
jorgesg1986
fceca07ec0 Added log messages when leadership is gained or lost (#25053) 2018-05-31 15:43:53 +02:00
Christopher Batey
485179c5f6 ClusterDeathWatchSpec: assert cluster status bewtween tests (#25126)
Test failed due to node4 still seeing node3 in a subsequent test
but assumed it had been removed.

Fixes #25065
2018-05-29 13:38:20 +02:00
Patrik Nordwall
7fc7744049 Quarantine and cleanup idle associations, #24972
* fix NPE in shutdownTransport
  * perhaps because shutdown before started
  * system.dispatcher is used in other places of the shutdown
* improve logging of compression advertisment progress
* adjust RestartFlow.withBackoff parameters
* quarantine after ActorSystemTerminating signal
  (will cleanup compressions)
* Quarantine idle associations
  * liveness checks by sending extra HandshakeReq and update the
    lastUsed when reply received
  * concervative default value to survive network partition, in
    case no other messages are sent
* Adjust logging and QuarantinedEvent for harmless quarantine
  * Harmless if it was via the shutdown signal or cluster leaving
2018-05-22 13:10:30 +02:00