Commit graph

12466 commits

Author SHA1 Message Date
Viktor Klang
d5095be95d Minor code cleanup 2011-01-01 22:20:43 +01:00
Viktor Klang
3c7d96fbf3 Minor code cleanup 2011-01-01 22:20:43 +01:00
Roland Kuhn
227f2bb7c9 convert test to WordSpec with MustMatchers 2011-01-01 21:15:10 +01:00
Roland Kuhn
61502794de convert test to WordSpec with MustMatchers 2011-01-01 21:15:10 +01:00
Roland Kuhn
91e210ebbb fix fallout of Duration changes in STM tests
- document change in Java API
2011-01-01 21:12:12 +01:00
Roland Kuhn
f4d87fa726 fix fallout of Duration changes in STM tests
- document change in Java API
2011-01-01 21:12:12 +01:00
Viktor Klang
f679dd06ab Added support for passive connections in Netty remoting, closing ticket #507 2011-01-01 21:01:44 +01:00
Viktor Klang
3d502a5226 Added support for passive connections in Netty remoting, closing ticket #507 2011-01-01 21:01:44 +01:00
Jonas Bonér
c7fd6870f8 Added support for 'deputy-nodes'.
* Added 'nr-of-deputy-nodes' config option
* Added fetching of current deputy node addresses
* Minor refactorings

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-01-01 01:50:33 +01:00
Jonas Bonér
0c405606e3 Added support for "leader election", the isLeader method and leader election tests. Also fixed bug in scrutinizer not maintaining the 'seen' map.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-20 17:22:07 +01:00
Jonas Bonér
a37c5f3c9a Renamed Gossiper to Node (and selfNode to vclockNode).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-20 15:47:14 +01:00
Jonas Bonér
663ca721b5 Split up ClusterDaemon into ClusterGossipDaemon (routed with configurable N instances) and ClusterCommandDaemon (shortly to be an FSM). Removed ConnectionManager crap.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-20 15:29:55 +01:00
Jonas Bonér
2de4c3b6b8 Created test tag LongRunningTest ("long-running") for excluding long running (cluster) tests from standard suite.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-19 21:18:16 +01:00
Jonas Bonér
8d48c1eed9 Added support for checking for Cluster Convergence and completed support for MembershipChangeListener (including tests).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-18 22:24:34 +01:00
Jonas Bonér
2313fc91ff Fixed remaining issues with gossip based failure detection and removal of unreachable nodes.
* Completed gossip based failure detection.
* Completed removal of unreachable nodes according to failure detector.
* Added passing tests.
* Misc other fixes, more logging, more comments.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-18 17:48:07 +01:00
Jonas Bonér
5ffe186af0 Added testkit time ratio sensitive durations.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-18 17:45:21 +01:00
Jonas Bonér
c37012c23b Removed printed stack trace from remote client/server errors. Just annoying when client hangs retrying and does not provide any real value since they are the same every time.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-18 17:40:58 +01:00
Jonas Bonér
5dd19c0f34 Fixed error in merge.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 14:48:40 +01:00
Jonas Bonér
fc030763a6 Merged with master 2012-02-16 11:20:51 +01:00
Jonas Bonér
b7a6a648ab Fixed bug in failure detector which also fixes bug in cluster scrutinize service. Also added test case for the bug.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:47 +01:00
Jonas Bonér
43cafb0d2e Disabling out erroneous cluster 'scrutinize' service until fixed and proper tests are written.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:18 +01:00
Jonas Bonér
510d778884 Renamed NodeGossipingSpec to NodeMembershipSpec since it is testing consistency of the cluster node membership table
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:18 +01:00
Jonas Bonér
678c03d526 Finalized initial cluster membership and merging of vector clocks and gossips in case of concurrent cluster updates. Plus misc other fixes.
* Finalized initial cluster membership.
* Added merging of vector clocks and gossips in case of concurrent cluster updates.
* Added toString methods to all cluster protocol classes
* Fixed bugs in incrementation of vector clocks
* Added updates of 'seen' table for cluster convergence
* Revamped to use new VectorClock impl
* Refactored Gossip.State

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:17 +01:00
Jonas Bonér
6779cf06ab Rewrite of the VectorClock impl. Now with 'merge' support and slicker API. Also added more tests.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:17 +01:00
Jonas Bonér
5b37037ed1 Added NodeGossipingSpec for testing gossiping and cluster membership.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:17 +01:00
Jonas Bonér
c0d18f8076 Implemented 'receive(newGossip)' plus misc other changes and fixes.
* Implemented 'receive(newGossip)'
* Added GossipEnvelope
* Added MetaDataChangeListener
* Changed MembershipChangeListener API
* Changed most internal API to work with Address rather than Member
* Added builder style API to Gossip for changing it in an immutable way
* Moved 'self: Member' from Gossip to State

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:17 +01:00
Jonas Bonér
607eac90e3 Added 'or' method to Versioned.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:17 +01:00
Jonas Bonér
b1f3107dd7 Refactored Gossip state and management. Introduced GossipOverview with convergence info, renamed some fields, added some new cluster commands.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:17 +01:00
Jonas Bonér
f3df542287 Skips gossipping and cluster scrutinization if singleton cluster.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 11:00:17 +01:00
Jonas Bonér
204bbc7b64 Switching node status to Up if singleton cluster. Added 'switchStatusTo' method. Updated the test. Profit.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 10:59:24 +01:00
Jonas Bonér
24d5b4615f Completed singleton and N-node cluster boot up and joining phase.
* Simplified node join phase.
* Added tests for cluster node startup and joining, both for singleton cluster and 2-node cluster.
* Fixed bug in cluster node address and cluster daemon lookup.
* Changed some APIs.
* Renamed 'contact-point' to 'node-to-join'.
* Minor refactorings.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 10:59:24 +01:00
Jonas Bonér
755408a528 Removed cluster seed nodes, added 'join.contact-point', changed joining phase, added singleton cluster mode plus misc other changes.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 10:58:29 +01:00
Jonas Bonér
089f50da0d Changes to cluster specification.
- Added section on single-node cluster.
- Changed seed nodes to deputy nodes.
- Seed nodes are no longer used as contact points only to break logical partitions.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 10:54:43 +01:00
Jonas Bonér
5c22c30738 Completed singleton and N-node cluster boot up and joining phase.
* Simplified node join phase.
* Added tests for cluster node startup and joining, both for singleton cluster and 2-node cluster.
* Fixed bug in cluster node address and cluster daemon lookup.
* Changed some APIs.
* Renamed 'contact-point' to 'node-to-join'.
* Minor refactorings.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 10:54:43 +01:00
Jonas Bonér
20f74bd284 Removed cluster seed nodes, added 'join.contact-point', changed joining phase, added singleton cluster mode plus misc other changes.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 10:54:43 +01:00
Jonas Bonér
b0626f0562 Changes to cluster specification.
- Added section on single-node cluster.
- Changed seed nodes to deputy nodes.
- Seed nodes are no longer used as contact points only to break logical partitions.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-16 10:52:38 +01:00
Roland Kuhn
6a672747b9 make TestKit assertions nicer / improve Duration 2010-12-31 17:57:08 +01:00
Roland Kuhn
b0db21f974 make TestKit assertions nicer / improve Duration 2010-12-31 17:57:08 +01:00
Roland Kuhn
da03c0552a remove unnecessary allocations in hot paths 2010-12-31 15:53:32 +01:00
Roland Kuhn
eddbac5478 remove unnecessary allocations in hot paths 2010-12-31 15:53:32 +01:00
Roland Kuhn
a45fc955e9 flesh out FSMTimingSpec
- add expectNoMsg and receiveWhile to TestKit
- add Ev(...) convenience extractor for FSM.Event
- switch to System.nanoTime for TestKit
2010-12-30 22:43:24 +01:00
Roland Kuhn
6f0d73b789 flesh out FSMTimingSpec
- add expectNoMsg and receiveWhile to TestKit
- add Ev(...) convenience extractor for FSM.Event
- switch to System.nanoTime for TestKit
2010-12-30 22:43:24 +01:00
Viktor Klang
718f831650 Adding support for failed messages to be notified to listeners, this closes ticket #587 2010-12-30 14:59:00 +01:00
Viktor Klang
f1f8d64e3c Adding support for failed messages to be notified to listeners, this closes ticket #587 2010-12-30 14:59:00 +01:00
Viktor Klang
0bdb5d5454 Adding possibility to set id for TypedActor 2010-12-30 13:23:09 +01:00
Viktor Klang
f45a86bd97 Adding possibility to set id for TypedActor 2010-12-30 13:23:09 +01:00
Roland Kuhn
68c0f7c8e9 add first usage of TestKit
- rename expect... methods to expectMsg... to avoid clash with scalatest
- add access to testActor, e.g. for registration of that actor with
	others
- add facility for ignoring messages in testActor, which would only
	clutter the test spec
2010-12-29 21:47:05 +01:00
Roland Kuhn
7e729ce3d2 add first usage of TestKit
- rename expect... methods to expectMsg... to avoid clash with scalatest
- add access to testActor, e.g. for registration of that actor with
	others
- add facility for ignoring messages in testActor, which would only
	clutter the test spec
2010-12-29 21:47:05 +01:00
Viktor Klang
4994b13fd5 Removed if statement because it looked ugly 2010-12-29 18:22:36 +01:00
Viktor Klang
3da0669233 Removed if statement because it looked ugly 2010-12-29 18:22:36 +01:00