Commit graph

25 commits

Author SHA1 Message Date
Patrik Nordwall
84ade6fdc3 add CoordinatedShutdown, #21537
* CoordinatedShutdown that can run tasks for configured phases in order (DAG)
* coordinate handover/shutdown of singleton with cluster exiting/shutdown
* phase config obj with depends-on list
* integrate graceful leaving of sharding in coordinated shutdown
* add timeout and recover
* add some missing artery ports to tests
* leave via CoordinatedShutdown.run
* optionally exit-jvm in last phase
* run via jvm shutdown hook
* send ExitingConfirmed to leader before shutdown of Exiting
  to not have to wait for failure detector to mark it as
  unreachable before removing
* the unreachable signal is still kept as a safe guard if
  message is lost or leader dies
* PhaseClusterExiting vs MemberExited in ClusterSingletonManager
* terminate ActorSystem when cluster shutdown (via Down)
* add more predefined and custom phases
* reference documentation
* migration guide
* problem when the leader order was sys2, sys1, sys3,
  then sys3 could not perform it's duties and move Leving sys1 to
  Exiting because it was observing sys1 as unreachable
* exclude Leaving with exitingConfirmed from convergence condidtion
2017-01-16 09:01:57 +01:00
Philippus Baalman
6c7085252a extended copyright into 2017 2017-01-04 17:37:15 +01:00
Patrik Nordwall
a7eed00948 Merge pull request #21813 from akka/wip-21518-patriknw
minor cleanup of cluster.subscribe usage
2016-11-16 21:33:02 +01:00
Patrik Nordwall
88a6bdb059 Cluster singleton testing (#21803)
* add another singleton restart test

* remove from singleton sorted set with unique address

* because the upNumber used by the Ordering can change
2016-11-11 15:10:30 -08:00
Patrik Nordwall
d9e873644e minor cleanup of cluster.subscribe usage 2016-11-08 15:14:52 +01:00
Patrik Nordwall
9be7df1527 send terminationMessage to singleton when leaving last, #21592 (#21654)
* send terminationMessage to singleton when leaving last, #21592

* When leaving last node, i.e. no newOldestOption, the manager was
  just stopped. The change is to send the terminationMessage also
  in this case and wait until the singleton actor is terminated
  before stopping the manager.
* Also changed so that the singleton is stopped immediately when
  cluster has been terminated when last node is leaving, i.e.
  no newOldestOption. Previously it retried until maxTakeOverRetries
  before stopping.
* More comprehensive test of this scenario in ClusterSingletonManagerLeaveSpec

* increase test timeout
2016-10-28 14:23:18 +02:00
Patrik Nordwall
e6068a0f5a Fix regression in Cluster Singleton, #21236
* When the test fails the node is removed from the membership
  twice, which triggers two OldestChanged cycles, but in
  the 2.4.9 change https://github.com/akka/akka/pull/21152/files#diff-f0ae95c926a050aecf45dba3e08d1c77L669
  the singleton manager always goes to End (stop) when it has been Oldest
* This fix restores the previous behavior for this scenario
2016-08-23 19:08:49 +02:00
Patrik Nordwall
0c4d4c37ba cluster singleton improvements, #20942
* track nodes by UniqueAddress in Cluster Singleton, #20942
* reply with HandOverDone from new incarnation, #20942
* confirm as terminated immediately when new incarnation joins, #20942 instead of waiting for failure detector to mark it as unreachable this will speed-up removal when restarting cluster node with same hostname:port
2016-08-19 11:56:55 +02:00
Björn Antonsson
c66ce62d63 Update to a working version of Scalariform 2016-06-02 22:12:36 +02:00
Johan Andrén
5671927cf1 clu #20309 API for pluggable cluster downing 2016-04-18 15:06:05 +02:00
Johannes Rudolph
b6cbc7f13a =all remove unused imports 2016-02-23 20:29:22 +01:00
Johan Andrén
62e30b3c08 Update copyrights and links to the new company name #19851 2016-02-23 12:58:39 +01:00
Prayag Verma
b7783968a0 =pro #19068 All copyrights ranges and single years updated to a range ending in 2016 2016-01-25 10:20:30 +01:00
Patrik Nordwall
c7c187f6b7 =clu replace Set -- with diff and ++ with union
* better performance according to
  https://docs.google.com/presentation/d/1Qjryxoe-fYEM8ZPhM-98LKfbhnRcn5eAEMNlVVnixsA/pub
2015-11-06 14:48:17 +01:00
Patrik Nordwall
9380983d3c =clu #18554 Make oldest assignment deterministic when joining
* the reported issue is fixed by the immediate leaderActions
  (moving to Up)  when joining the first node to itself
* the other changes are precautions just in case
2015-10-21 07:53:14 +02:00
Patrik Nordwall
6d036ca00c =clt #16948 Use min retries for singleton leaving scenario"
* In 2.4 we derive the number of hand-over/take-over retries from
  the removal margin, but we decided to set that to 0 by default, since
  it is intended for network partition scenarios. maxTakeOverRetries
  became 1. So there must be also be a  min number of retries property.
* The test failed for the leaving scenario because the singleton
  instance was stopped hard without sending the terminationMessage when
  the maxTakeOverRetries was exceeded.
2015-09-17 10:38:52 +02:00
Patrik Nordwall
bfde1eff19 =clu #18337 Disable down-removal-margin by default
For manual downing it is not needed. For auto-down it doesn't add any extra safety, since that
is not handling network partitions anyway.

The setting is still useful if you implement downing strategies that handle network partitions,
e.g. by keeping the larger side of the partition and shutting down the smaller side.
2015-09-04 11:28:33 +02:00
Patrik Nordwall
775a2ca40c =cls #17699 Add some DeadLetterSuppression 2015-08-19 15:38:05 +02:00
Patrik Nordwall
33e05ea59a =clt #18232 Serializer for ClusterSingleton 2015-08-18 19:57:15 +02:00
Roland Kuhn
0de9f0ff40 Merge pull request #17641 from kukido/kukido-spellings-normalization
=doc #17329 Fixed and normalized spellings in ScalaDoc and comments
2015-06-19 12:06:53 +02:00
Patrik Nordwall
2a88f4fb29 =clu Improve cluster downing
* avoid using Down and Exiting member from being used for joining
* delay shut down of Down member until the information is spread
  to all reachable members, e.g. downing several nodes via one node
* akka.cluster.down-removal-margin setting
  Margin until shards or singletons that belonged to a
  downed/removed partition are created in surviving partition.
  Used by singleton and sharding.
* remove the retry count parameters/settings for singleton in
  favor of deriving those from the removal-margin
2015-06-18 12:55:54 +02:00
Patrik Nordwall
23c28af469 !clt #15410 Change path in ClusterSingletonProxy.props
* to avoid giving the name of both singleton manager and singleton instance
2015-06-18 11:31:29 +02:00
Andrey Myatlyuk
bc791eb86c =doc #17329 Fixed and normalized spellings in ScalaDoc and comments 2015-06-02 21:06:25 -07:00
Patrik Nordwall
7ab5da21d3 !cto #17454 Introduce ClusterSingletonManagerSettings and ClusterSingletonProxySettings 2015-05-19 08:59:09 +02:00
Patrik Nordwall
fb72214d99 !clt #13711 Move cluster tools from contrib
* new module akka-cluster-tools containing
  cluster singleton, distributed pub-sub, and cluster client
2015-05-11 20:07:21 +02:00
Renamed from akka-contrib/src/main/scala/akka/contrib/pattern/ClusterSingletonManager.scala (Browse further)