Commit graph

7817 commits

Author SHA1 Message Date
Viktor Klang
a7e9ff4fba Switching to AbortPolicy by default 2011-11-14 19:48:06 +01:00
Viktor Klang
afe1e37648 BUSTED
!
2011-11-14 19:25:24 +01:00
Viktor Klang
66dd0123bc Temporary fix for the throughput benchmark 2011-11-14 19:19:44 +01:00
Viktor Klang
d14e524485 Removing yet another broken ActorPool test 2011-11-14 15:12:11 +01:00
Viktor Klang
1c35232fa7 Removing pointless test from ActorPoolSpec, tweaking the ActiveActors...Capacitor 2011-11-14 15:00:23 +01:00
Viktor Klang
78022f4a1c Removing nonsensical check for current message in ActiveActorsPressureCapacitor 2011-11-14 14:43:40 +01:00
Viktor Klang
e40b7cd8d6 Fixing bug where a dispatcher would shut down the executor service before all tasks were executed, also taking the opportunity to decrease the size per mailbox by atleast 4 bytes 2011-11-14 14:09:23 +01:00
Viktor Klang
0307a655d3 Removing potential race condition in reflective cycle breaking stuff 2011-11-14 11:24:06 +01:00
Viktor Klang
86af46fb6c Moving comment to right section 2011-11-14 11:22:24 +01:00
Viktor Klang
31fbe76e06 It is with great pleasure I announce that all tests are green, I now challenge thee, Jenkins, to repeat it for me. 2011-11-14 11:18:17 +01:00
Viktor Klang
d978758c8e Merge branch 'master' of github.com:jboner/akka 2011-11-14 09:50:01 +01:00
Roland
a08234cd9a introduce base64 random names
- remove Props.randomName and associated logic
- ActorRefFactory contains AtomicLong which is used to generate unique
  children names
- base64-like encoding is used with reverse “digit” order
- disallow given names which are null, empty or start with ‘$’
- random names start have ‘$’ prepended (‘$’ not being one of the 64
  characters)
- special marker “$_” for tempPath until “/tmp” supervisor is introduced
- TestActorRef uses globally unique “$$” prefix, as it creates actors
  beneath any supervisor as instructed by the user
2011-11-13 20:38:14 +01:00
Roland
5d85ab37e3 implement 'stopping' state of actors
Calling ActorRef.stop() schedules a Terminate() system message. I
changed the effect of this message by splitting the
systemInvoke.terminate() method into two parts:
- in the old place only cancel receiveTimeout and .stop() all children
  plus set 'stopping' flag
- in handleChildTerminated if children are empty while stopping==true
  call doTerminate(), which detaches from dispatcher and does all the
  usual cleanup
- if no children were there, this happens directly from terminate()
- while 'stopping', process only ChildTerminated() and Terminate(),
  ignore Terminated() and dump all the rest to app.deadLetterMailbox
- to make this less convoluted move AutoReceiveMessage handling from
  Actor to ActorCell (including become/unbecome), which was all
  accessing ActorContext anyway
- teach TestEventListener that DeadLetters with Terminate()/Terminated()
  are not that bad
There is no retry of the .stop(), yet, but that can easily be added now
in each Actor which shuts something down: simply watch the target, if no
Terminated() is received retry. It is not 100% reliable, though, if only
the ChildTerminated() was lost, because that will not be regenerated by
the deadLetterMailbox ... need to think about that one.

All tests green on my machine.
2011-11-13 14:56:41 +01:00
Roland
92b0d1713b fix more EventFilter related issues
- LoggingBus.startDefaultLoggers would not wait for their
  initialization, leading to non-reception of Mute messages at the very
  start of test, which would in turn fail those test which require a
  number of occurrences.
- fix that by having each logger respond to InitializeLogger(bus) as
  soon as subscriptions are done (max 3 seconds, else Warning)
- make akka.actor.simpleName not use String.replaceAll (performance
  oversight on my part)
- rename MainBusSpec object to EventStreamSpec
- give loggers nicer names: "log<id>-<classname>"
2011-11-13 12:59:16 +01:00
Roland
55637092ed fix EventStreamSpec (was relying on synchronous logger start) 2011-11-13 01:47:46 +01:00
Roland
6097db55c6 do not stop testActor
- automatic timeout was previously used for allowing clean shutdown, but
  that does not work anymore anyway, must call ActorSystem.stop()
- that will also stop testActor, so no need for special treatment
- the automatic stop caused various eerie problems in different places,
  because on Jenkins some sleep periods were longer, leading to such
  timeout, which combined with the non-logging of dead letters made it
  seem worse than it was
2011-11-13 00:34:30 +01:00
Roland
02a5cd081c remove ActorRef from Failed/ChildTerminated and make some warnings nicer
- the same information is transmitted as sender, hence enabling
  ChildTerminated to become a singleton
- make lastSender accessible in TestKit (needed now for DeathWatchSpec)
- fix nasty infinite loop when logging at the wrong moment during
  shutdown
2011-11-13 00:19:56 +01:00
Roland
1ba168774f improve DeadLetter reporting
(since I know now what’s causing these Jenkins failures ;-) )

- include recipient in DeadLetter
- include recipient in calls to enqueue/systemEnqueue
- move DeadLetterMailbox to ActorSystem (saves some space, too)
- hook up DeadLetterMailbox so it sends DeadLetters to app.deadLetters,
  which publishes them on the eventStream
- subscribe TestEventListener to DeadLetter and turn it into Warning

The generated warnings about ChildTerminated are very much correct, they
remind us that we still need to fix supervisor.stop() to await all
children’s death before actually committing suicide.
2011-11-12 10:57:28 +01:00
Roland
85e37ea8ef fix one safe publication issue
(don't get your hopes up just yet: ActorPoolSpec still failing)

The issue was that during the LocalActorRef constructor 'this' was
published via the ActorCell's start method. The JMM's visibility
guarantee for final fields is only valid after the constructor returned,
thus I introduced a store-load barrier before calling ActorCell.start by
making actorCell a @volatile var (not sure what @volatile val means).
That way every user of the ActorRef reads the volatile field before
anything else, ensuring proper publication of the whole
LocalActorRef/ActorCell conglomerate (where the latter has quite a lot
of non-final fields).
2011-11-11 20:56:48 +01:00
Roland
cd5baf8cd9 silence some more expected messages which appeared only on Jenkins (first try) 2011-11-11 20:56:48 +01:00
Roland
56cb2a2f30 clean up test output, increase default timeouts
- apply EventFilters so that at least on my machine no expected messages
  are printed
- add new test config settings to akka-reference.conf
- set default for loglevel to WARNING
- print out timeout values in case of various timeouts if they occur
2011-11-11 20:56:48 +01:00
Roland
e5c3b39502 correct cleanupMailboxFor to reset the system messages before enqueuing 2011-11-11 20:56:48 +01:00
Jonas Bonér
aedb319484 Fixed missing import 2011-11-11 20:38:18 +01:00
Jonas Bonér
f0fa7bccb0 Merge branch 'master' of github.com:jboner/akka 2011-11-11 20:06:08 +01:00
Jonas Bonér
9671c55a09 Removed RoutedProps.scala (moved the remaining code into Routing.scala).
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-11-11 20:05:53 +01:00
Jonas Bonér
166a5df839 Removed config elements for Mist.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-11-11 20:01:25 +01:00
Jonas Bonér
e88d07305d Cleaned up RoutedProps and removed all actorOf methods with RoutedProps.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-11-11 19:57:27 +01:00
Roland
3808853845 fix some bugs, but probably not the pesky ones
- enqueuing system messages to DeadLetterMailbox was broken in
  principle, but not in practice for the current default deadLetter
  implementation
- add assert that system messages are not enqueued multiple times
- *BusSpec was using incorrect compareSubscribers based on
  identityHashCode, so moved the proper solution out of
  BalancingDispatcher and into akka.util.Helpers and reuse that in all
  places
2011-11-11 17:44:57 +01:00
Roland
9a10953219 Add config default for TestKit wait periods outside within()
- introduce Duration.Undefined and use that to initialize TestKit.end
  (also use in places which abused Duration.MinusInf for similar
  purposes)
- TestKit.remaining now returns AkkaConfig.SingleExpectDefaultTimeout if
  end == Duration.Undefined

This will hopefully catch most of the cases where Jenkins previously
aborted the build after 60min.
2011-11-11 16:53:13 +01:00
Roland
aa1977db8d further tweak timings in FSMTimingSpec 2011-11-11 16:53:12 +01:00
Roland
997a258eb7 adapt TestTimeSpec to recent timefactor-fix 2011-11-11 16:53:12 +01:00
Viktor Klang
f02e3bedd2 Splitting out the TypedActor part of the ActorPoolSpec to isolate it 2011-11-11 15:50:31 +01:00
Jonas Bonér
a9049ec9e5 Added test for ScatterGatherFirstCompletedRouter. Fixes #1275.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-11-11 14:53:45 +01:00
Viktor Klang
7ec510fbd6 Merge branch 'master' of github.com:jboner/akka 2011-11-11 12:59:35 +01:00
Viktor Klang
7931032898 Removing postMessageToMailbox and taking yet another stab at the pesky balancing dispatcher race 2011-11-11 12:59:19 +01:00
Roland
ad79b552cc make FSMTimingSpec even more robust (no, really!)
- plus remove one unused local import to make it 200% negative
2011-11-11 12:32:48 +01:00
Roland
817130d65c add specific override from System.getProperties for akka.test.timefactor
- I suspect that this caused some of the recent timeouts, because that
  got implicitly disabled by my moving TestTimeFactor into AkkaConfig
- special-cased since the full solution of making everything overridable
  is being worked out by Havoc
2011-11-11 12:01:14 +01:00
Roland
aa1b39c97d use actor.self when logging system message processing errors 2011-11-11 11:37:59 +01:00
viktorklang
5d81c59eef Merge pull request #108 from jboner/he-doc-generation-fix
Added explicit import to help SBT with dependencies during documentation...
2011-11-11 00:33:46 -08:00
Henrik Engstrom
f2bec7006f Added explicit import to help SBT with dependencies during documentation generation 2011-11-11 09:30:39 +01:00
Roland
53353d7031 rename MainBus to EventStream (incl. field in ActorSystem) 2011-11-10 21:01:37 +01:00
Roland
945b1aedf9 rename akka.AkkaApplication to akka.actor.ActorSystem
Renaming it to System did not appeal after seeing that such a thing is
already imported from Predef ...
2011-11-10 21:00:01 +01:00
Viktor Klang
c6e44ffef7 Removing hostname and port for AkkaApplication, renaming defaultAddress to address, removing Deployer.RemoteAddress and use the normal akka.remote.RemoteAddress instead 2011-11-10 19:20:07 +01:00
Viktor Klang
c75a8db0de Merging in Henriks HashedWheelTimer stuff manually 2011-11-10 18:41:51 +01:00
Viktor Klang
1fb1309dc3 Merging with master 2011-11-10 18:06:16 +01:00
Viktor Klang
ba9281e267 Removing InetSocketAddress as much as possible from the remoting, switching to RemoteAddress for an easier way forward with different transports. Also removing quite a few allocations internally in the remoting as a side-efect of this. 2011-11-10 17:39:31 +01:00
Roland
7553a892c4 turn unknown event in StandardOutLogger into warning 2011-11-10 17:06:51 +01:00
Roland
5b9a57d6e4 optimize SubchannelClassification.publish (manual getOrElse inline) 2011-11-10 17:06:51 +01:00
Henrik Engstrom
1577f8bcb3 Updated after code review:
Removed logging
Slimmed down the Java code
Moved default scheduler
2011-11-10 16:31:50 +01:00
Roland Kuhn
3e166030ec Merge pull request #107 from jboner/actor-path
Actor path: created pull request in Peter’s name
2011-11-10 06:11:12 -08:00