Commit graph

277 commits

Author SHA1 Message Date
Patrik Nordwall
d552e06a07 Add deploy-on-own-node setting for cluster router, see #2103
* Useful for master-worker scenario where all routees are remote.
2012-09-07 12:07:41 +02:00
Patrik Nordwall
c84e05a779 Organize imports, see #2103 2012-08-30 13:52:47 +02:00
Patrik Nordwall
e422d188c2 Use the router actor as cluster listener, see #2103
* Removed need for extra actor that subscribes to cluster
  events
* ClusterRouterActor is the router actor and aslo subscribes
* Less scary initialization, and safe calls to createRoutees
* Intercept ClusterDomainEvent to route them to ClusterRouterActor
  instead of to the routees
2012-08-30 12:13:50 +02:00
Patrik Nordwall
ba5df98740 Unregister routees living on removed node, see #2103 2012-08-30 10:54:58 +02:00
Patrik Nordwall
b22a092932 Support programatic declaration of cluster router, see #2103
* Ordinary withRouther withDeploy is TOO ugly for this
* Implicit conversion adds withClusterRouter to Props
  for Scala API
* Helper method in ClusterRouterPropsDecorator for Java API
2012-08-30 10:06:12 +02:00
Patrik Nordwall
695ce49727 Deploy to new members in cluster, see #2103
* Config max-nr-of-instances-per-node
* selectDeploymentTarget that takes max-nr-of-instances-per-node
  and nr-of-instances into account
* Deploy when new member added or removed
* Moved routeeProps to RouteeProvider constructor, needed for
  this feature, but also simplifies createRoute, createRoutee,
  and resize, since routeeProps doesn't have to be passed around.
2012-08-29 19:33:19 +02:00
Patrik Nordwall
f4cc8f8649 Make it more intuitive for tests using real Cluster(system) extension, see #2103
* We will write more tests that rely on real Cluster(system) extension,
  such as ClusterRoundRobinRoutedActorSpec
* When not using FailureDetectorStrategy or overriding seed nodes
  MultiNodeClusterSpec will use the real Cluster(system) extension
  instead of a new Cluster instance with additional test facilities
2012-08-28 16:38:05 +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
4a06719722 Merge branch 'master' into wip-2202-fine-grained-events-patriknw
Conflicts:
	akka-cluster/src/multi-jvm/scala/akka/cluster/TransitionSpec.scala
2012-08-27 16:52:06 +02:00
Patrik Nordwall
1ad701c330 Fix failing TransitionSpec, see #2423
* The failure is due to the now eventually updated view.
* Must use await asserts.
2012-08-21 17:51:49 +02:00
Patrik Nordwall
20a038fdfd Fine grained events, see #2202
* Defined the domain events in ClusterEvent.scala file
* Produce events from diff  and publish publish to event bus
  from separate actor, ClusterDomainEventPublisher
* Adjustments of tests
2012-08-21 15:35:38 +02:00
Patrik Nordwall
1700edb863 Merge branch 'master' into wip-2202-cluster-domain-events-patriknw
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/ClusterDaemon.scala
2012-08-16 18:54:10 +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
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
7b6ff9b019 More aggressive testing of startup order, see #2270 2012-08-14 17:38:11 +02:00
Patrik Nordwall
d7b0089d7e Support concurrent startup of seed nodes, see #2270
* Implemented the startup sequence of seed nodes as
  described in #2305
* Test that verifies concurrent startup of seed nodes
2012-08-14 15:16:23 +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
1114da2198 Importing language features used by akka-cluster and akka-remote-tests 2012-07-26 14:47:21 +02:00
Roland
b2ce64fb6f fix up multi-jvm tests 2012-07-25 18:02:45 +02:00
Viktor Klang
af8ce260d3 Correcting erronous code links 2012-07-25 13:26:33 +02:00
Viktor Klang
aa4ad6f3c3 Making it green 2012-07-22 21:40:09 +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
37826533d3 Fix race in UnreachableNodeRejoinsClusterSpec 2012-07-05 09:50:58 +02:00
Patrik Nordwall
05015536b3 Add missing auto-down=on, due to changed default (lost in merge) 2012-07-04 17:03:59 +02:00
Patrik Nordwall
c1d12550a4 Fix bugs, see #2311 2012-07-04 16:09:01 +02:00
Patrik Nordwall
9368475512 Deleted NodeLeavingSpec, see #2289
* Because it was also time sensitive and already covered by NodeLeavingAndExitingSpec
2012-07-04 16:02:13 +02:00
Viktor Klang
3911b18069 Merging in master 2012-07-04 15:24:23 +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
9bf5a74f92 Merge branch 'master' into wip-2290-leader-merge-patriknw
Conflicts:
	akka-cluster/src/test/scala/akka/cluster/ClusterConfigSpec.scala
2012-07-04 11:46:28 +02:00
Patrik Nordwall
98d78db80a Merge pull request #568 from akka/wip-2287-LeaderLeavingSpec-patriknw
Fix time sensitivity in LeaderLeavingSpec, see #2287
2012-07-04 02:42:38 -07:00
Patrik Nordwall
aa88818f71 Fix time sensitivity in NodeLeavingAndExitingSpec, see #2289 2012-07-03 11:09:34 +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
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
6ad96c2579 Review changes 2012-06-29 13:24:46 +02:00
Björn Antonsson
db1175e1f3 Bringing UnreachableNodeRejoinsClusterSpec up to speed with master 2012-06-29 13:24:46 +02:00
Björn Antonsson
dd042e3573 Group multiple awaitCond into single one 2012-06-29 13:24:46 +02:00
Björn Antonsson
9691dd0325 Changes after review 2012-06-29 13:24:46 +02:00
Björn Antonsson
2ea0bba9e9 Cluster node that is UNREACHABLE and rejoins. see #2160 2012-06-29 13:24:46 +02:00
Patrik Nordwall
f970c87ea4 Fix time sensitivity in LeaderLeavingSpec, see #2287 2012-06-29 09:38:06 +02:00
Patrik Nordwall
211732391d Minor improvement of LargeClusterSpec, see #2239 2012-06-29 08:42:52 +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
Patrik Nordwall
932ea6f98a Test split brain scenario, see #2265 2012-06-26 18:25:42 +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
patriknw
a4e27aaea6 Merge pull request #560 from akka/wip-2267-seed-before-singleton-patriknw
Join seed nodes before becoming singleton cluster, see #2267
2012-06-26 04:19:48 -07:00
Patrik Nordwall
a3ceb40754 Start seed nodes sequentially in JoinSeedNodeSpec, see #2271 2012-06-26 09:51:04 +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
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
66bcca8a91 Shorter gossip interval still needed 2012-06-25 15:46:30 +02:00