Commit graph

836 commits

Author SHA1 Message Date
Jonas Bonér
ec7772b786 Fixes bug in RandomRouter.
Fixes an interesting "bug" in RandomRouter. Tests failed on my 12 core Linux box. After some investigation I found that it hanged randomly inside the SecureRandom seed generator.

[JVM-Node4] "main" prio=10 tid=0x0000000001701000 nid=0x1942 runnable [0x00007fee631dc000]
[JVM-Node4]    java.lang.Thread.State: RUNNABLE
[JVM-Node4]   at java.io.FileInputStream.readBytes(Native Method)
[JVM-Node4]   at java.io.FileInputStream.read(FileInputStream.java:236)
[JVM-Node4]   at sun.security.provider.SeedGenerator$URLSeedGenerator.getSeedBytes(SeedGenerator.java:509)
[JVM-Node4]   at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:135)
[JVM-Node4]   at sun.security.provider.SecureRandom.engineGenerateSeed(SecureRandom.java:131)
[JVM-Node4]   at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:188)
[JVM-Node4]   - locked <0x00000007c3d84130> (a sun.security.provider.SecureRandom)
[JVM-Node4]   at java.security.SecureRandom.nextBytes(SecureRandom.java:450)
[JVM-Node4]   - locked <0x00000007c3d843d0> (a java.security.SecureRandom)
[JVM-Node4]   at java.security.SecureRandom.next(SecureRandom.java:472)
[JVM-Node4]   at java.util.Random.nextInt(Random.java:272)
[JVM-Node4]   at akka.routing.RandomLike$class.getNext$2(Routing.scala:466)

Puzzled at first I Googled the problem and found this bug report: http://bugs.sun.com/view_bug.do?bug_id=6521844

In short it is designed to block on /dev/random (on Linux) when the entropy pool is empty until some "environmental noise is gathered".

From the Linux manual:
"Hanging at generateSeed is not a bug, since that's what was designed:
    When the entropy pool is empty, reads from /dev/random will block until
    additional environmental noise is gathered.
    (Source: Linux Programmer's Manual, section 4)"

Fix was to switch to java.util.Random.

Fun one

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-03 14:56:50 +01:00
Patrik Nordwall
09e13e271b Merge branch 'master' into wip-1310-err2-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala
	akka-cluster/src/main/scala/akka/cluster/Cluster.scala
	akka-cluster/src/main/scala/akka/cluster/TransactionLog.scala
	akka-remote/src/main/scala/akka/remote/netty/NettyRemoteSupport.scala
2012-02-03 13:57:28 +01:00
Roland
45140b465e Merge remote-tracking branch 'origin/master' into wip-1644-programmatic-deploy-∂π 2012-02-03 09:49:04 +01:00
Roland
c699c3d32d include review comments
- rename NoScope -> NoScopeGiven
- add scaladoc for scopes
- add some return types
2012-02-03 09:43:23 +01:00
Roland
76bba1f530 remote deploy docs & provider.getExternalAddressFor (see #1765) 2012-02-03 09:16:18 +01:00
Roland
d8fa7578e1 move RemoteServerStarted message to NettyRemoteTransport, fixes #1771
- also make port=0 (auto) for two remote tests (config&deployer)
- also fix remote-sample conf files to configure “netty” section
2012-02-02 11:46:52 +01:00
Jonas Bonér
7bb49d4a90 Refactored multi-jvm tests to use other ports than regular remote testing, also the ability to configure a specific port range for each test.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-02 09:03:50 +01:00
Patrik Nordwall
5033647176 Fixed things from review. See #1310 2012-02-01 17:38:12 +01:00
Viktor Klang
e58d0d9940 Switching to an orchestrated teardown on READ_TIMEOUT 2012-02-01 16:20:51 +01:00
Viktor Klang
9421f37f96 Ripping out ReadTimeout and adding Idle timeout and fixing issues with configured port on top of that 2012-02-01 16:06:30 +01:00
Jonas Bonér
34dc791034 Refactored multi-jvm tests to use other ports than regular remote testing, also the ability to configure a specific port range for each test.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-01 15:48:01 +01:00
Jonas Bonér
0a7e37910e Added stack trace to the logging of remote client/server errors. Added helper methods to make a string representation of stack trace to AkkaException object.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-01 15:46:40 +01:00
Roland
10974acfe8 make it possible to programmatically deploy (e.g. remotely), see #1644
- add Deploy to Props, which is used as the basis (overridden by
  configuration)
- utilize general mechanism .withFallback (introduced on Deploy,
  RouterConfig and Scope)
- actually pass Props over the wire when deploying remotely in order to
  retain settings (this was an oversight before)
- write tests for the new functionality
2012-02-01 15:19:51 +01:00
viktorklang
d8d0f4486f Merge pull request #284 from jboner/wip-1735-fix-pipe-to-√
Removing pipeTo from akka.actor, renamed pipeTo(f,a) to pipe(f,a)
2012-02-01 05:57:44 -08:00
Patrik Nordwall
c447f46224 Some polish on the error handling. See #1310 2012-02-01 14:40:12 +01:00
Viktor Klang
aca5693ce6 Restructuring the pattern internals so it is modular 2012-02-01 13:37:57 +01:00
Viktor Klang
3363a6984d Remove that shit 2012-02-01 11:39:04 +01:00
Jonas Bonér
5a1c0da8ae converted tabs to spaces 2012-01-31 15:50:06 +01:00
Jonas Bonér
575ae92fb9 Changed line endings from DOS to UNIX 2012-01-31 15:49:24 +01:00
Jonas Bonér
0b59640820 Fixed bunch of stuff based on feedback on pull request.
Moved all cluster config to akka-cluster (and added test).

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 15:01:06 +01:00
Jonas Bonér
0fa184560c Moved Gossiper, FailureDetector and VectorClock (with tests) to the akka-cluster module. Deleted all old unused cluster code (ZooKeeper-based stuff).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:06 +01:00
Jonas Bonér
64301f5d77 Moved failure detector config from 'remote' to 'cluster' 2012-01-31 13:34:06 +01:00
Jonas Bonér
f914dfe83b Merged with master.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:06 +01:00
Jonas Bonér
c6fb6def13 Enhanced the Gossip state with member status, ring convergence flags etc.
* Added member status, ring convergence flags etc to Gossip state.
* Updated Gossiper to use Member throughout instead of ParsedTransportAddress.
* Commented out cluster membership updating to be replaced by the one in the cluster specification.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:06 +01:00
Jonas Bonér
56b94227d3 Added some options to the cluster config section. Moved gossip config from remote to cluster section.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:06 +01:00
Jonas Bonér
4b0b985f98 Added test for testing the Failure Detector when used together with Gossiper and a set of remote cluster nodes.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:05 +01:00
Jonas Bonér
135f1e3002 Added logging to AccrualFailureDetector
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:05 +01:00
Jonas Bonér
642be72a6b Added 'Versioned' abstraction which is versioned through a VectorClock (including tests).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:05 +01:00
Jonas Bonér
04cf3ea7db Added initial join cluster through seed nodes phase to Gossiper plus misc other fixes and additions.
- Added JoinCluster phase (connect and get initial data from seed nodes) to Gossiper.
- Added '/system/cluster' daemon actor to Gossiper responsible for gossip communication.
- Added various config options to Gossiper.
- Fixed misc bugs in Gossiper.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:05 +01:00
Jonas Bonér
e24238377f Minor code and ScalaDoc formatting changes.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:05 +01:00
Jonas Bonér
6db989ffa3 Fixed ugly logging in NettyRemoteSupport (plus misc minor formatting).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-01-31 13:34:05 +01:00
Roland
4fb0858e55 remote cleanup: include feedback from Viktor and Patrik
- re-label Client/Server to Inbound/Outbound for netty settings
  description
- move to just using exactly one class loader for all reflective
  activities of the ActorSystem, which is either the context class
  loader or the one which loaded the ActorSystem’s class; document that
  putting Akka on boot class path will not work
- be more careful with initializing the Client- and ServerBootstrap
- rename Port to DesiredPortFromConfig to discourage misuse
- write test for NettySettings
- various small fixes
2012-01-30 11:57:24 +01:00
Roland
4482f14650 properly fix the port==0 issue and use it in more tests
- add documentation to RemoteTransport interface what is expected wrt.
  address’ availability before, during and after start()
2012-01-27 15:21:05 +01:00
Roland
ac1ee9ae91 rework use of ClassLoaders, see #1736 2012-01-27 14:21:54 +01:00
Roland
c5fc153a10 rework system initialization, remove remote address from LocalActorRef
- move all creation of ActorRefs into the ActorRefProvider (deadLetters,
  locker)
- rootPath does not contain remote transport address any longer in order
  to start the LocalActorRefProvider before the RemoteTransport; the
  transport address is inserted during serialization only, which enables
  us later to have more than one transport available for one actor
  system (maybe even needed for clustering)
- fix inheritance between DeadLetterActorRef and EmptyLocalActorRef
- document some start-up dependencies by reordering constructor code
- fix remote tests which used self.path for identifying remote actors
  (since that no longer includes the remote transport address)
2012-01-27 12:14:28 +01:00
Roland
52d6e5625d Merge remote-tracking branch 'origin/master' into wip-1685-remote-cleaup-∂π 2012-01-26 11:24:23 +01:00
viktorklang
5f4d566a8c Merge pull request #264 from jboner/wip-1661-remoteconfigspec-√
Fixing so that RemoteConfigSpec actually tests what is used by Akka
2012-01-26 01:14:07 -08:00
viktorklang
d80a84ac03 Merge pull request #261 from jboner/wip-1662-remove-dead-imports-√
Wip 1662 remove dead imports √
2012-01-26 01:12:33 -08:00
Eugene Vigdorchik
0f92df274d Use IndexedSeq instead of Arrays. 2012-01-25 20:43:03 +04:00
Eugene Vigdorchik
c8cd25e913 Factor out localhost and re-enable schoir. 2012-01-25 20:12:26 +04:00
Viktor Klang
91a6348497 Fixing so that RemoteConfigSpec actually tests what is used by Akka 2012-01-25 16:50:06 +01:00
Viktor Klang
fb03dd97dc Fixing multi-jvm tests 2012-01-25 16:12:28 +01:00
Viktor Klang
1590438b0c Removing dead imports from akka-remote 2012-01-25 15:55:27 +01:00
Roland
2a0c4ca145 Merge branch 'wip-1581-patterns-ask' 2012-01-23 18:35:30 +01:00
Roland
9d7ed5eba1 update copyright headers 2012-01-23 18:25:43 +01:00
Viktor Klang
f0bc2c7435 Adding brackets around remote debug log parameters 2012-01-21 13:29:16 +01:00
Viktor Klang
7e0cf29e8f Adding config options, tests and conditional code for remote message logging 2012-01-21 00:32:37 +01:00
Roland
34a0f005b1 Merge branch 'master' into wip-1581-patterns-ask 2012-01-20 19:29:17 +01:00
Roland
1f99b425de docs for ask/pipeTo patterns 2012-01-20 18:09:26 +01:00
Viktor Klang
4b527518db Merging in the daemonicity stuff 2012-01-20 15:50:22 +01:00