- 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
- initial resize should be done directly
- must not require children unconditionally in Router constructor
- ResizerSpec changed timing due to asynchronous resizing, one test
disabled
- removed pointless volatile write in RouterActorRef
- first, fix quite some data races in RoutedActorRef wrt. the contained
ActorCell’s childrenRef field (which is not even @volatile)
- then notice that there still are double-deregistrations happening in
the dispatcher
- coming finally to the conclusion that the Mailbox should not really
process all system messages in processAllSystemMessages(): we should
really really stop after having closed the mailbox ;-)
- added simple test case which stops self twice to keep this fixed
* Tried to add @SerialVersionUID(1L) but that removed static forwarders, due to https://issues.scala-lang.org/browse/SI-4804
* Added Serializable to UntypedActorFactory
* Removed some unecessary Serializable
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>
- 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
- move package objects into their respective package.scala file in the
right directories
- make implicit conversion as well as explicit facility available under
the same name akka.patterns.ask for easy import
- revert the logic to produce the Promise for the PromiseActorRef within
the ActorRefProvider; supporting wrapping of external Promises does
not seem to justify doing needless extra allocations in case of
failure
- add scaladocs
- factor out “def provider” into trait ActorRefWithProvider, as it
didn’t feel right attaching this information “by exception” to
MinimalActorRef
* RemoteRouterConfig wrapper with RemoteRouteeProvider instead if fixed remote routers.
* Had to refactor and introduce RouteeProvider for different implementations of how to create routees.
* Works with Resizer also.
* Added some tests.
* CustomRouterConfig and CustomRoute
* Added create methods in the predefined router objects for java equivalent of apply
* IndexedSeq instead of Vector in public api