Commit graph

33 commits

Author SHA1 Message Date
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
Roland Kuhn
2bb208297d Merge pull request #17154 from akka/wip-13869-cluster-singleton-speedup-patriknw
=con #13869 Speedup startup of Cluster singleton
2015-04-14 21:24:45 +02:00
Patrik Nordwall
2ecfa42801 =con #13869 Speedup startup of Cluster singleton
* avoid the hand-over/take-over attempts when starting the
  ClusterSingletonManager for the normal clase when the cluster is
  in a good shape, i.e. no exiting member that might run previous
  singleton instance
2015-04-14 16:21:25 +02:00
Patrik Nordwall
a12bca1b15 =doc Clarify cluster singleton role 2015-04-13 10:07:14 +02:00
Julian Tescher
00f6a58e7c Changes all occurances of Typesafe copyright to extend to 2015 2015-03-10 14:12:19 -07:00
Shikhar Bhushan
efc254db87 minor docfixes in ClusterSingletonManager.scala 2014-05-07 11:09:53 +05:30
dario.rexin
2cbad298d6 =all #3858 Make case classes final 2014-03-07 13:20:01 +01:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Patrik Nordwall
a11fb1dafc =act #3572 Add parens to sender
* because it is not referentially transparent; normally we reserved parens for
  side-effecting code but given how people thoughtlessly close over it we revised
  that that decision for sender
* caller can still omit parens
2014-01-17 18:21:14 +01:00
Patrik Nordwall
2e5193347e !clu #3617 API improvements related to CurrentClusterState
* Getter for CurrentClusterState in Cluster extension, updated via
  ClusterReadView
* Remove lazy init of readView. Otherwise the cluster.state will be
  empty on first access, wich is probably surprising
* Subscribe to several cluster event types at once, to ensure *one*
  CurrentClusterEvent followed by change events
* Deprecate publishCurrentClusterState, was a bad idea, use sendCurrentClusterState
  instead
* Possibility to subscribe with InitialStateAsEvents to receive events corresponding
  to CurrentClusterState
* CurrentClusterState not a ClusterDomainEvent, ticket #3614
2014-01-16 16:17:44 +01:00
Patrik Nordwall
b3b66db643 +con #3758 Provide sharding of actors in a cluster
* Delete files only from controller
* Change default retry settings of singleton to speedup startup
* Persistent snapshots
2013-12-13 16:19:35 +01:00
Patrik Nordwall
23f933afe3 !con #3597 Remove hand over data message in cluster singleton 2013-09-10 13:35:51 +02:00
Endre Sándor Varga
b566e9393d =act, rem, clu #3521: make serialize-messages work with core modules 2013-08-27 11:05:54 +02:00
Patrik Nordwall
146e2c0719 Fix exiting ordering problem in ClusterSingletonManager, see #3408
* The problem was:
  - first is leaving, second is new oldest
  - two actors subscribe to cluster events, OldestChangedBuffer and ClusterSingletonManager
  - ClusterSingletonManager receives MemberExited(first), and then also MemberRemoved(second)
    before OldestChangedBuffer receives MemberExited(first) and delivers
    OldestChanged(first->second)
  - MemberRemoved(second) is the result of the cluster extension shutdown
  - because ClusterSingletonManager gets the MemberRemoved(second) before the OldestChanged
    it will not send the hand over data to second
  - second becomes new singleton after retry period, as designed, but without hand over data
 * The solution is to check the selfExited flag in Oldest state, similar to what is done
   in WasOldest
 * I considered the alternative to tunnel all member events through same subscriber,
   but that would involve more changes to the code
2013-05-29 09:11:43 +02:00
Patrik Nordwall
e02188d634 Merge pull request #1479 from akka/wip-3382-ClusterSingletonManagerSpec-patriknw
ClusterSingletonManagerSpec must not use 'node' from other thread, see #3382
2013-05-27 00:14:46 -07:00
Patrik Nordwall
3736efb79a Merge pull request #1472 from akka/wip-3225-cluster-infolog-patriknw
Config of cluster info logging, see #3225
2013-05-27 00:13:08 -07:00
Patrik Nordwall
716893263a ClusterSingletonManagerSpec must not use 'node' from other thread, see #3382
* Thank you @rkuhn for finding the reason for the problem
* Sprinkled some warnings
2013-05-24 14:43:06 +02:00
Patrik Nordwall
18a3b3facf Config of cluster info logging, see #3225 2013-05-23 13:36:35 +02:00
Patrik Nordwall
ee6e80d31a Add previousStatus in MemberRemoved, see #3252 2013-05-23 11:09:32 +02:00
Patrik Nordwall
a0a0f39613 Hardening of cluster member leaving path, see #3309
* Removed leader commands for Shutdown and Exit
* Member shutdown itself  when it sees itself as Exiting
* Singleton cluster with status Exiting will shutdown itself,
  in case the Exiting gossip never arrives
* Exiting member not part convergence check
* Exiting member is removed by leader (on convergence) when the
  exiting member is in the unreachable set, i.e. sucessfully shutdown
* Reverted the change made for #3266, i.e. Exiting is
  detected as unreachable again.
* Adjust ClusterSingletonManager to new Exiting behaviour
* Fix bug in HeartbeatSender, which caused it to continue to
  send heartbeats to removed nodes, instead of rebalancing
* Refactoring of leaderActions method
* Leaving section in docs
2013-05-17 11:39:49 +02:00
Patrik Nordwall
b8b65c9153 Cluster member age, and usage in singleton, see #3195
* Assign internal upNumber when member is moved to Up
* Public API Member.isOlder
* Change cluster singleton to use oldest member instead of leader
* Update samples and docs
2013-05-03 13:38:35 +02:00
drewhk
98d4bcc9dd Merge pull request #1338 from drewhk/wip-1478-sysmsg-guaranteed-delivery-drewhk
Guaranteed delivery of system messages (and now praying...)
2013-04-18 12:38:28 -07:00
Patrik Nordwall
4293bd7a2d Factory methods for Props
* cleanup of deprecated usage of Props in cluster sample
2013-04-18 16:41:05 +02:00
Endre Sándor Varga
2b0a27be9e Added acknowledged delivery of system messages 2013-04-18 16:10:20 +02:00
Patrik Nordwall
1d1a6383df Distributed pub-sub in cluster, see #3203 2013-04-14 19:58:12 +02:00
Patrik Nordwall
887af975ae Deprecate actorFor in favor of ActorSelection, see #3074
* Deprecate all actorFor methods
* resolveActorRef in provider
* Identify auto receive message
* Support ActorPath in actorSelection
* Support remote actor selections
* Additional tests of actor selection
* Update tests (keep most actorFor tests)
* Update samples to use actorSelection
* Updates to documentation
* Migration guide, including motivation
2013-04-08 18:11:52 +02:00
Patrik Nordwall
7eac88f372 Cluster node roles, see #3049
* Config of node roles cluster.role
* Cluster router configurable with use-role
* RoleLeaderChanged event
* Cluster singleton per role
* Cluster only starts once all required per-role node
  counts are reached,
  role.<role-name>.min-nr-of-members config
*  Update documentation and make use of the roles in the examples
2013-03-18 11:56:11 +01:00
Patrik Nordwall
d98a7ef1e8 Cluster singleton failure due to down-removed, see #3130
* The scenario was that previous leader left.
* The problem was that the new leader got MemberRemoved
  before it got the HandOverDone and therefore missed the
  hand over data.
* Solved by not changing the singleton to leader when receiving
  MemberRemoved and instead do that on normal HandOverDone or
  in failure cases after retry timeout.
* The reason for this bug was the new transition from Down to
  Removed and that there is now no MemberDowned event. Previously
  this was only triggered by MemberDowned (not MemberRemoved) and
  that was safe because that was "always" preceeded by unreachable.
* The new solution means that it will take longer for new singleton
  to startup in case of unreachable previous leader, but I don't
  want to trigger it on MemberUnreachable because it might in the
  future be possible to switch it back to reachable.
2013-03-11 12:37:35 +01:00
Patrik Nordwall
5b844ec1e6 Publish member events when state change first seen, see #3075
* Remove InstantMemberEvent
2013-03-07 14:07:17 +01:00
Patrik Nordwall
323e5c80b5 Polish the API/SPI of remoting, see #2827
* Changed TransportAdapterProvider to support java impl
* Verified java impl of AbstractTransportAdapter and
  ActorTransportAdapter
* Privatized things that should not be public api
* Consistent usage of INTERNAL API marker in scaladoc
* Added some missing doc in conf
* Added missing SerialVersionUID
2013-02-10 17:47:43 +01:00
Patrik Nordwall
4ee299c729 Hardening of another corner case in cluster singleton, see #3017
* It was an unlikely situatation that was not covered,
  the new leader didn't know previous, because it transitioned
  from Start -> BecomeLeader, old leader was removed and got
  LeaderChanged(None), so none of them could request the other
  for hand-over or take-over.
* Taken care of with the retry timeouts, also when leader
  receives LeaderChanged(None)
* The old leader should have received a propert LeaderChanged
  earlier, which is a flaw in the way we publish leader events.
  That part will be fixed in a separate commit.
2013-02-08 08:04:23 +01:00
Patrik Nordwall
c48d9c058e Clarifications of cluster singleton docs, see #2895 2013-01-29 11:03:25 +01:00
Patrik Nordwall
0c38a76c37 Cluster singleton actor pattern, see #2895
* ClusterSingletonManager
* ClusterSingletonManagerSpec multi-node test
* Use in cluster router with single master sample
* Extensive logging to be able to understand what is
  going on
* Java api
* Add cluster dependency to contrib
* Add contrib dependency to sample
* Scaladoc
* rst docs in contrib area, ref from cluster docs
2013-01-25 14:00:28 +01:00