Commit graph

70 commits

Author SHA1 Message Date
Patrik Nordwall
30df518421 =tes Use ConversionCheckedTripleEquals 2015-03-10 08:17:03 +01:00
Patrik Nordwall
503c4ced8f !clu #3920 Remove deprecated Cluster.publishCurrentClusterState 2014-03-14 14:11:28 +01:00
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
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
Björn Antonsson
003609c9c5 =pro #3759 Changed to using non-deprecated ScalaTest Matchers 2013-12-18 11:32:51 +01:00
Patrik Nordwall
d5b25cbbc6 !act #3583 Timer based auto-down
* Replace (deprecate) akka.cluster.auto-down config setting with
  akka.cluster.auto-down-unreachable-after
* AutoDown actor that keeps track of unreachable members
  and performs down from the leader node when they have been
  unreachable for the specified duration
* Migration guide
2013-09-27 14:32:03 +02:00
Patrik Nordwall
ad1eaa6d4a Remove auto-join config, derive from seed-nodes, see #3359 2013-05-17 13:54:51 +02:00
Patrik Nordwall
806fc0c525 Use awaitAssert in cluster tests, see #3168 2013-03-25 13:08:06 +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
cab78e5174 Make cluster fault handling more robust, see #3030
* ClusterCoreDaemon and ClusterDomainEventPublisher can't be restarted
  because the state would be obsolete.
* Add extra supervisor level for ClusterCoreDaemon and
  ClusterDomainEventPublisher, which will shutdown the member
  on failure in children.
* Publish the final removed state on postStop in
  ClusterDomainEventPublisher. This also simplifies the removing
  process.
2013-02-12 21:55:08 +01:00
Endre Sándor Varga
99adbdfab4 Changed and documented new remoting configuration #2593 2013-01-24 12:35:05 +01:00
Patrik Nordwall
4a5695f9d8 Change wrong netty port conf in tests 2013-01-24 09:53:18 +01:00
Patrik Nordwall
d07f331e78 Publish InstantMemberEvent immediately, see #2803 2013-01-14 19:13:48 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Endre Sándor Varga
55be17419e Merge branch 'master' into wip-2053d-actorbased-remote-drewhk
Conflicts:
	akka-docs/rst/java/code/docs/serialization/SerializationDocTestBase.java
	akka-docs/rst/scala/code/docs/serialization/SerializationDocSpec.scala
	akka-remote-tests/src/main/scala/akka/remote/testconductor/NetworkFailureInjector.scala
	akka-remote/src/main/scala/akka/remote/RemoteActorRefProvider.scala
2012-12-18 15:15:01 +01:00
Björn Antonsson
a03460329d Change cluster MemberEvents to only be published on convergence. See #2692
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/ClusterEvent.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterJmx.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterMetricsCollector.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterReadView.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
	akka-docs/rst/cluster/cluster-usage-java.rst
	akka-docs/rst/cluster/cluster-usage-scala.rst
	akka-kernel/src/main/dist/bin/akka-cluster
2012-12-14 12:46:13 +01:00
Endre Sándor Varga
682abccf7e Added defaultAddress() to RemoteTransport API 2012-11-21 14:18:24 +01:00
Endre Sándor Varga
5f9253b79e New Remoting implementation (iteration 3) #2053
- Asynchronous lockless remoting
 - Pluggable transport drivers
 - Multiple transport support
 - Simplified lifecycle events
 - Support for netty based TCP, SSL+TCP and UDP support
 - Updated Akka protocol with soft-state connections and failure detection
 - Refactored failure detectors (currently duplicated from cluster)
2012-10-29 16:32:15 +01:00
Roland
0f04239f67 move Duration classes according to scala 2.10 nightly and remove casts to FiniteDuration, see #2504 2012-10-11 15:18:10 -07:00
Patrik Nordwall
50d0efe7d4 Request send/publish of CurrentClusterState, see #2438
* Added publishCurrentClusterState and sendCurrentClusterState
* Removed Ping/Pong that was used for some tests, since awaitCond is
  now needed anyway, since publish to eventStream is done afterwards
2012-09-12 09:23:02 +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
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
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
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
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
17f0ce9f89 Add back Cluster JMX, see 2311
* Separate class
* Simple test
2012-07-05 11:57:59 +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
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
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
Viktor Klang
32dc65aab5 Merge branch 'master' into wip-scala210M4-√ 2012-06-26 13:50:37 +02:00
Viktor Klang
4ae26230b3 Merge branch 'master' into wip-scala210M4-√ 2012-06-26 12:15:46 +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
Viktor Klang
c37b97452b Making akka-cluster compile and tests green 2012-06-25 17:21:06 +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
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
Patrik Nordwall
fb04786072 Cleanup based on review comments, see #2201 2012-06-18 11:16:30 +02:00
Patrik Nordwall
e9a96afef8 Use FailureDetectorPuppet in ClusterSpec 2012-06-15 14:45:41 +02:00
Patrik Nordwall
de1ad30217 Fix false convergence when singleton cluster, see #2222
* All members must be in seen table for convergence
* Added extra debug logging due to convergence issues
* Enabled test of convergence for node joining singleton
  cluster
2012-06-12 16:16:44 +02:00
Patrik Nordwall
a7d2be10eb Merge branch 'master' into wip-2214-heartbeats-patriknw
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/AccrualFailureDetector.scala
	akka-cluster/src/main/scala/akka/cluster/Cluster.scala
2012-06-11 22:27:08 +02:00
Patrik Nordwall
e2551494c4 Use Use separate heartbeats for FailureDetector, see #2214
* Send Heartbeat message to all members at regular interval
* Removed the need to gossip to myself
2012-06-11 15:00:44 +02:00
Jonas Bonér
ec7177be74 Misc fixes after FailureDetectorPuppet and abstraction review
- Moved FailureDetectorPuppet to its own file in src/test.
- Removed 'phi' method from FailureDetector public API.
- Throwing exception instead of falling back to default if we can't load the custom FD.
- Removed add-connection method in FailureDetectorPuppet.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-06-11 10:06:53 +02:00
Jonas Bonér
a4499b06bb Abstracted the FailureDetector into a interface trait and added controllable failure detector mock.
- Abstracted a FailureDetector trait.
- Added a FailureDetectorPuppet mock that can be user controllable
- Added option to define a custom failure detector
- Misc minor fixes

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-06-10 16:52:33 +02:00
Patrik Nordwall
9ca794dcc8 Totally skip running multi-jvm tests when long-running is excluded, see #2194 2012-06-07 13:32:42 +02:00
Patrik Nordwall
bc289df018 Unit tests of Cluster, see 2163
* ClusterSpec
- Test gossiping rules for deputies and unreachable
- Fix strange/wrong probabilites for gossip to unreachable and deputy nodes
- Fix lost order of Members when using map (without .toSeq) on the members SortedSet

* MemberSpec
- Test equals, hashCode

* GossipSpec
- Test member merge by status prio
- Fix bug in member merge (groupBy was wrong)
2012-06-07 08:29:07 +02:00
Patrik Nordwall
24212f14bc Rename mySelf in MultiNodeSpec to myself 2012-05-28 15:29:00 +02:00