Commit graph

757 commits

Author SHA1 Message Date
Roland
669a4ff9ca make unbalanced Address() constructor private, fix parsing, see #1806 2012-02-13 17:46:14 +01:00
Patrik Nordwall
e017aeef08 Replace akka.actor.timeout with specfic settings. See #1808
* ActorTimeout (akka.actor.timeout) was used to all sorts of things.
* TestKit default-timeout
* TypedActor timeout for non void methods
* Transactor coordinated-timeout
* ZeroMQ new-socket-timeout
* And in various tests
2012-02-10 16:07:17 +01:00
Roland
47741511aa Merge branch 'wip-1750-remove-ReflectiveAccess-∂π' 2012-02-10 14:38:58 +01:00
Roland
6786e45dc7 Merge branch 'wip-1804-router-create-race-∂π' 2012-02-10 14:38:51 +01:00
Roland
4b71872aef fixing up final misnamers (createClassFor -> getClassFor) 2012-02-10 14:36:35 +01:00
Roland
36247b10fe fix some more comments and make Router dispatcher configurable
- assert locking balance when using Unsafe.instance.monitorExit
- add RouterConfig.routerDispatcher
- re-enable “busy” resizer test after switching to BalancingDispatcher
- document resizer asynchronicity and how to configure dispatchers
2012-02-10 14:13:40 +01:00
Roland
d2f28a06cd Merge remote-tracking branch 'origin/master' into wip-1750-remove-ReflectiveAccess-∂π 2012-02-10 11:41:47 +01:00
Roland
dca309c535 incorporate Patrik’s feedback
- rename to DynamicAccess
- rename to createInstanceFor / createClassFor
- fix a few little things
2012-02-10 11:36:23 +01:00
Viktor Klang
d910eeae69 Removing the erronous execution context and added Java API 2012-02-10 08:20:36 +01:00
Roland
2ce47d6bb5 Bye-bye ReflectiveAccess, introducing PropertyMaster, see #1750
- PropertyMaster is the only place in Akka which calls
  ClassLoader.getClass (apart from kernel, which might be special)
- all PropertyMaster methods (there are only three) take a ClassManifest
  of what is to be constructed, and they verify that the obtained object
  is actually compatible with the required type

Other stuff:
- noticed that I had forgotten to change to ExtendedActorSystem when
  constructing Extensions by ExtensionKey (damn you, reflection!)
- moved Serializer.currentSystem into JavaSerializer, because that’s the
  only one needing it (it’s only used in readResolve() methods)
- Serializers are constructed now with one-arg constructor taking
  ExtendedActorSystem (if that exists, otherwise no-arg as before), to
  allow JavaSerializer to do its magic; possibly necessary for others as
  well
- Removed all Option[ClassLoader] signatures
- made it so that the ActorSystem will try context class loader, then
  the class loader which loaded the class actually calling into
  ActorSystem.apply, then the loader which loaded ActorSystemImpl
- for the second of the above I added a (reflectively accessed hopefully
  safe) facility for getting caller Class[_] objects by using
  sun.reflect.Reflection; this is optional an defaults to None, e.g. on
  Android, which means that getting the caller’s classloader is done on
  a best effort basis (there’s nothing we can do because a StackTrace
  does not contain actual Class[_] objects).
- refactored DurableMailbox to contain the owner val and use that
  instead of declaring that in all subclasses
2012-02-09 11:56:43 +01:00
Roland
224ce7f773 tone it down: just a Warning in case of ambiguous serializers 2012-02-07 15:51:41 +01:00
Roland
8b9f1caf67 change serialization to strictly rely on subtyping
- when encountering new message type, check all bindings which map apply
- if multiple are found, choose the most specific one if that exists or
  verify that all mappings yield the same serializer
- in case of remaining ambiguity, throw exception
- also add special handling for “none” serializer mapping: turn off a
  default
2012-02-07 15:11:16 +01:00
patriknw
50d107e150 Merge pull request #309 from jboner/wip-1789-ser2-patriknw
Configure serializer with class as key. See #1789
2012-02-07 04:54:32 -08:00
Patrik Nordwall
0bd4663c91 PinnedDispatcher config and docs for dispatcher executor.
* Update PinnedDispatcher config in tests and docs. See #1796
* Update dispatchers doc with info about executor. See #1795
2012-02-07 09:50:03 +01:00
Patrik Nordwall
1dbce49359 Configure serializer with class as key. See #1789 2012-02-06 21:15:17 +01:00
Jonas Bonér
42f5af7fb0 fixes review comments 2012-02-05 09:19:57 +01:00
Jonas Bonér
f855ff2add Fixed misc stuff after review.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-04 17:50:11 +01:00
Jonas Bonér
ff62a1cf2a Removed unnecessary config options.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-03 18:10:50 +01:00
Jonas Bonér
6abc3b33e3 Fixed bug in ScatterGatherFirstCompletedRouterSpec.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-03 18:09:13 +01:00
Jonas Bonér
2ec15db091 Merge branch 'master' into wip-fix-multi-jvm-test-jboner 2012-02-03 16:38:28 +01:00
Jonas Bonér
278658e031 Merge branch 'wip-fix-multi-jvm-test-jboner' of github.com:jboner/akka into wip-fix-multi-jvm-test-jboner 2012-02-03 15:00:55 +01:00
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