Commit graph

7840 commits

Author SHA1 Message Date
Viktor Klang
9f36aeff7f Switching to the same system message emptying strategy as for the normal Dispatcher, on the BalancingDispatcher 2011-11-17 14:21:28 +01:00
Roland
d4cfdff80f move japi subpackages into their own directories from reduced Eclipse disturbances 2011-11-16 19:11:52 +01:00
Viktor Klang
1bf5abb29a Removing UnsupportedActorRef and replacing its use with MinimalActorRef 2011-11-16 17:06:03 +01:00
Viktor Klang
18bfa26272 Renaming startsMonitoring/stopsMonitoring to startsWatching and stopsWatching 2011-11-16 16:46:16 +01:00
Viktor Klang
af3600b175 Prolonging the timeout for the throughput performance spec 2011-11-16 16:23:19 +01:00
Viktor Klang
1613ff5111 Making sure that dispatcher scheduling for shutdown is checked even if unregister throws up 2011-11-16 16:19:56 +01:00
Viktor Klang
39b374ba22 Switching to a Java baseclass for the MessageDispatcher so we can use primitive fields and Atmoc field updaters for cache locality 2011-11-16 16:09:58 +01:00
Viktor Klang
13bfee782f Removing Un(der)used locking utils (locking is evil) and removing the last locks from the MessageDispatcher 2011-11-16 15:54:14 +01:00
viktorklang
5593e860bc Merge pull request #94 from kjellwinblad/master
Ticket #1282 Test for the new Index class
2011-11-15 08:00:22 -08:00
Kjell Winblad
d07d8e84b8 Merge remote branch 'upstream/master' 2011-11-15 16:48:55 +01:00
viktorklang
37074051f8 Merge pull request #110 from jboner/wip-896-durable-mailboxes-patriknw
Enabled durable mailboxes and implemented them with mailbox types.
2011-11-15 06:52:27 -08:00
Patrik Nordwall
a6e75fb702 Added cleanUp callback in Mailbox, dused in ZooKeeper. Some minor cleanup 2011-11-15 14:39:43 +01:00
Patrik Nordwall
cf675d29ce Merge branch 'master' into wip-896-durable-mailboxes-patriknw 2011-11-15 14:22:32 +01:00
Kjell Winblad
127358860f Merge remote branch 'upstream/master' 2011-11-15 12:06:37 +01:00
Viktor Klang
727c7de58d Removing bounded executors since they have probably never been used, also, removing possibility to specify own RejectedExecutionHandler since Akka needs to know what to do there anyway. Implementing a sane version of CallerRuns 2011-11-15 10:32:00 +01:00
Viktor Klang
13647b2b61 Doh 2011-11-14 19:52:35 +01:00
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
Patrik Nordwall
4aa1905ce3 Enabled durable mailboxes and implemented them with mailbox types. See #895
* Changed to RemoteProtocol
2011-11-14 11:25:10 +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