Commit graph

233 commits

Author SHA1 Message Date
Patrik Nordwall
ac16d567ea Improvements based on review comments from √, see #2103 2012-09-11 19:11:20 +02:00
Patrik Nordwall
018a949678 Merge branch 'master' into wip-2103-cluster-routers-patriknw
Conflicts:
	akka-cluster/src/multi-jvm/scala/akka/cluster/ClientDowningNodeThatIsUnreachableSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/ClientDowningNodeThatIsUpSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/ConvergenceSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/LeaderElectionSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/SingletonClusterSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/SplitBrainSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/UnreachableNodeRejoinsClusterSpec.scala
	akka-cluster/src/test/scala/akka/cluster/ClusterSpec.scala
	akka-remote/src/main/scala/akka/routing/RemoteRouterConfig.scala
2012-09-11 10:55:47 +02:00
Patrik Nordwall
83e7f5d6d6 Incorparate review comments, see #2473
* Also added ClusterSettings in constructor of ClusterDaemon,
  because that will be needed to decide if the metrics actor is
  to be started
2012-09-07 17:42:15 +02:00
Patrik Nordwall
b400b0b818 Merge branch 'master' into wip-2103-cluster-routers-patriknw
Conflicts:
	akka-remote/src/main/scala/akka/routing/RemoteRouterConfig.scala
2012-09-07 16:57:49 +02:00
Patrik Nordwall
6dd0d736f7 Merge branch 'master' into wip-2473-npe-subscribe-patriknw
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/Cluster.scala
2012-09-06 22:02:23 +02:00
Patrik Nordwall
bd6c39178c Fix leaking this in constructor of Cluster, see #2473
* Major refactoring to remove the need to use special
  Cluster instance for testing. Use default Cluster
  extension instead. Most of it is trivial changes.
* Used failure-detector.implementation-class from config
  to swap to Puppet
* Removed FailureDetectorStrategy, since it doesn't add any value
* Added Cluster.joinSeedNodes to be able to test seedNodes when Addresses
  are unknown before startup time.
* Removed ClusterEnvironment that was passed around among the actors,
  instead they use the ordinary Cluster extension.
* Overall much cleaner design
2012-09-06 21:48:40 +02:00
Patrik Nordwall
806b5efcdf Fix NPE due to initialization order, see #2473 2012-09-06 10:04:52 +02:00
Viktor Klang
4eee04cb60 #2469 - Switching to scala.util.Try instead of Either[Throwable, T] in the codebase 2012-09-06 03:17:51 +02:00
Patrik Nordwall
417bdc2dfb Prototype of cluster aware routers, see #2103
* Several FIXME that needs to be discussed
* ClusterRouterConfig created via ClusterActorRefProvider
2012-08-28 11:54:52 +02:00
Patrik Nordwall
4e2d7b0495 Move Cluster query methods to ClusterReadView, see #2202
* Better separation of concerns
* Internal API (could be made public if requested)
2012-08-16 18:28:01 +02:00
Patrik Nordwall
846b8543fb Make SeenChanged internal api, see #2202 2012-08-16 10:08:07 +02:00
Patrik Nordwall
06f81f4373 Improve publish of domain events, see #2202
* Gossip is not exposed in user api
* Better and more events
* Snapshot event sent to new subscriber
* Updated tests
* Periodic publish only for internal stats
2012-08-15 16:47:34 +02:00
Patrik Nordwall
bc4d8fc7c5 Remove ClusterEventBus and system.eventStream, see #2202 2012-08-14 15:33:34 +02:00
Patrik Nordwall
e38dd80f38 Publish cluster changes to event bus, see #2202
* ClusterEventBus
* Removed register listener and related
* Removed Gossip.meta because it doesn't handle version conflicts
2012-08-14 11:03:30 +02:00
Viktor Klang
9d097bcf50 Making it possible/mandatory to signal which ExecutionContext will actually execute something scheduled 2012-08-08 15:57:30 +02:00
Viktor Klang
ac5b5de90a Merging in master, huge work trying to get things to compile, tests not green at this stage 2012-07-06 17:04:04 +02:00
Patrik Nordwall
01ee8e8fbf Separate Cluster to several files, see #2311
* Introduced ClusterEnvironment trait to make it easier to test
  the actors without using the extension
* Incorparate more feedback from review
2012-07-05 13:57:44 +02:00
Patrik Nordwall
20a1e67575 Incorparate feedback from review, see #2311 2012-07-05 12:23:15 +02:00
Patrik Nordwall
17f0ce9f89 Add back Cluster JMX, see 2311
* Separate class
* Simple test
2012-07-05 11:57:59 +02:00
Patrik Nordwall
ce9f530c32 Fix bug in convergence, see #2317 2012-07-05 10:53:18 +02:00
Patrik Nordwall
37826533d3 Fix race in UnreachableNodeRejoinsClusterSpec 2012-07-05 09:50:58 +02:00
Patrik Nordwall
6aa5f93f6e Make Cluster ready for use before constructor returns, #2311 2012-07-05 07:56:51 +02:00
Patrik Nordwall
c1d12550a4 Fix bugs, see #2311 2012-07-04 16:09:01 +02:00
Patrik Nordwall
fbeb6017cc Remove gossip to deputy nodes, see #2310 2012-07-04 14:39:27 +02:00
Patrik Nordwall
c708d2ad8a First step in refactoring of cluster internals to actors, see #2311
* Move clustering code to ClusterCore actor
* More will be done, comitting this for early review
2012-07-04 13:52:14 +02:00
Patrik Nordwall
1ccb9fe7ec Note about URLEncode instead of MD5, see #2290 2012-07-04 11:58:51 +02:00
Patrik Nordwall
e5979bc31c Gossip merge in large cluster, #2290
* Trying to simultaneously resolving conflicts at several nodes creates new conflicts.
  Therefore the leader resolves conflicts to limit divergence. To avoid overload there
  is also a configurable rate limit of how many conflicts that are handled by second.
* Netty blocks when sending to broken connections. ClusterHeartbeatSender actor
  isolates sending to different nodes by using child workers for each target
  address and thereby reduce the risk of irregular heartbeats to healty
  nodes due to broken connections to other nodes.
2012-07-02 23:00:41 +02:00
Patrik Nordwall
c09caebe8a Small refactoring of cluster actors
* Separate actor for heartbeats, so they are more isolated from gossip
  messages
* Configuration property for dispatcher to use for the cluster actors
2012-07-02 23:00:41 +02:00
Viktor Klang
8ede1f55e9 Moving to s.c.EC and s.c.A, compiles but tests aren't passing 2012-06-29 16:40:36 +02:00
Viktor Klang
e62a0eee1c Merge with master 2012-06-29 16:07:36 +02:00
Viktor Klang
54a3a44bf8 #2292 - Removing akka.util.Duration etc and replace it with scala.concurrent.util.Duration 2012-06-29 13:33:20 +02:00
Björn Antonsson
675dfd9182 Keep the cluster node membership change listeners when joining. 2012-06-29 13:24:46 +02:00
Björn Antonsson
6ad96c2579 Review changes 2012-06-29 13:24:46 +02:00
Björn Antonsson
574ff26bb4 Support for re-JOINING a node that have been DOWN. See #1908 2012-06-29 13:24:46 +02:00
Patrik Nordwall
d47ff04c03 Moved GossipDifferentViewProbability to config, see #2253 2012-06-29 08:56:58 +02:00
Viktor Klang
dec7824de8 Merge branch 'master' into wip-scala210M4-√ 2012-06-28 15:55:47 +02:00
Patrik Nordwall
2da1a912fe Improve efficiency of gossip, see #2193 and #2253
* Essentially as already described in cluster specification,
  but now fully implemented and tested with LargeClusterSpec
* Gossip to nodes with different view (using seen table)
  with certain probability
* Gossip chat, gossip back to sender
* Immediate gossip to joining node
* Updated some tests to reflect current implementation
2012-06-28 11:41:48 +02:00
Patrik Nordwall
aca66de732 Test gossip in large cluster, see #2239 2012-06-28 11:41:28 +02:00
Viktor Klang
702b5d9c19 Switching to the embedded jsr166y in scala.concurrent and dropping akka.jsr166y 2012-06-26 18:19:55 +02:00
Patrik Nordwall
aed78f702b Workaround for SI-5986, see #2275
* Add new operators :+ and :++ by implicit conversion
* Unfortunately this means that we must remember to use
  these until SI-5986 is fixed. Is there a better way?
2012-06-26 18:19:33 +02:00
Patrik Nordwall
25996bf284 Join seed nodes before becoming singleton cluster, see #2267
* self is initially not member (in gossip state)
* if the join to seed nodes timeout it joins itself, and becomes
  singleton cluster
* remove the special case handling of singelton cluster in gossip
  merge, since singleton cluster is not the normal state when joining
  any more
2012-06-25 21:34:14 +02:00
Patrik Nordwall
2cd38e2004 Merge branch 'master' into wip-2263-gossip-unreachable-patriknw
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/Cluster.scala
2012-06-25 20:59:50 +02:00
Patrik Nordwall
97bf8c4bb5 Cleanup of comments, see #2263 2012-06-25 20:46:48 +02:00
Patrik Nordwall
20fc0c42a2 Merge branch 'master' into wip-2219-seed-nodes-patriknw
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/AccrualFailureDetector.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterSettings.scala
2012-06-25 20:40:06 +02:00
Patrik Nordwall
738565883b Add join-seed-node-timeout config, see #2219 2012-06-25 20:20:11 +02:00
Patrik Nordwall
cba64403a7 Don't gossip to unreachable, see #2263
* Also, ignore gossip from unreachable, see #2264
* Update gossip protocol in cluster doc
2012-06-25 15:23:15 +02:00
patriknw
555998b2c1 Merge pull request #553 from akka/wip-2249-heartbeats-after-join-patriknw
Start sending heartbeats immediately when joining, see #2249
2012-06-25 01:26:18 -07:00
patriknw
24e49b1024 Merge pull request #551 from akka/wip-2250-singleton-cluster-merge-patriknw
Avoid gossip merge when singleton cluster, see #2250
2012-06-25 01:25:14 -07:00
Patrik Nordwall
42078e7083 Reintroduce 'seed' nodes, see #2219
* Implement the join to seed nodes process
  When a new node is started started it sends a message to all
  seed nodes and then sends join command to the one that answers
  first.
* Configuration of seed-nodes and auto-join
* New JoinSeedNodeSpec that verifies the auto join to seed nodes
* In tests seed nodes are configured by overriding seedNodes
  function, since addresses are not known before start
* Deputy nodes are the live members of the seed nodes (not sure if
  that will be the final solution, see ticket 2252
* Updated cluster.rst with latest info about deputy and seed nodes
2012-06-21 11:05:02 +02:00
Viktor Klang
9b73d75c1b Removing the naught default in code of the failure detector and changed so that the AccrualFailureDetectors constructor matches what the instantiator expects 2012-06-20 14:14:10 +02:00