Commit graph

8035 commits

Author SHA1 Message Date
Roland
66c1d62a51 Merge branch 'wip-ActorPath-rk' 2011-12-06 15:12:09 +01:00
Viktor Klang
96182885c2 #1437 - Replacing self with the DeadLetterActorRef when the ActorCell is shut down, this to direct captured self references to the DLQ 2011-12-06 11:28:29 +01:00
Roland
b2a8e4ccae document requirements of our Scheduler service 2011-12-06 09:27:32 +01:00
Roland
9d7597c728 Merge branch master into wip-ActorPath-rk
Had to make Davy Jones a bit more robust, i.e. put him into a different
system to guarantee survival until all messages are delivered.
2011-12-05 22:46:34 +01:00
Roland
82dc4d67c9 fix remaining review comments 2011-12-05 21:43:58 +01:00
Roland
cdc5492101 correct spelling of Davy Jones 2011-12-05 21:03:05 +01:00
Roland
c0c9487451 make testActor spew out uncollected messages after test end
(so you don’t need expectNoMsg after tests)
2011-12-05 19:03:01 +01:00
Roland
d2cffe7e33 do not use the only two special characters in Helpers.base64
If automatically generated names contains * and ?, they might do
something strange when being looked up. There was no real issue with our
current tests, but I just want to avoid the issue.
2011-12-05 18:23:49 +01:00
Roland
3c06992d2e incorporate review comments 2011-12-05 17:31:54 +01:00
Roland
13eb1b6c8b replace @volatile for childrenRefs with mailbox status read for memory consistency 2011-12-05 16:18:56 +01:00
Roland
0b5f8b083d rename ActorPath.{pathElemens => elements} 2011-12-05 15:57:43 +01:00
Roland
eeca88d674 add test for “unorderly” shutdown of ActorSystem by PoisonPill
- uncovered nasty endless loop bug wrt. dead letters and a dead listener
- fixing that bug removed the MainBusReaper (sigh)
- also fix compilation of tutorial-first, but that REALLY needs to be
  changed not to create RoutedActorRef using new!
2011-12-05 15:18:22 +01:00
Viktor Klang
5530c4cbdb Unborking master 2011-12-05 14:01:03 +01:00
Jonas Bonér
5f91bf5c7d Added disabled GossipMembershipMultiJVMSpec.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-05 12:34:17 +01:00
Jonas Bonér
d12a33235f Fixed wrong help text in exception. Fixes #1431.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2011-12-05 12:31:56 +01:00
Jonas Bonér
d6d9cedf0e Merge branch 'master' of github.com:jboner/akka 2011-12-05 11:14:13 +01:00
Jonas Bonér
ddf3a36673 Added JSON file for ls.implicit.ly 2011-12-05 11:14:05 +01:00
Patrik Nordwall
c8a1a96310 Updated config documentation 2011-12-05 10:41:36 +01:00
Roland
829c67f60c fix one leak in RoutedActorRef (didn’t properly say good-bye) 2011-12-03 23:14:52 +01:00
Roland
ea4d30e732 annotate my new FIXMEs with RK 2011-12-03 22:42:13 +01:00
Roland
236ce1557c fix visibility of top-level actors after creation
Obtaining an ActorRef means that its path must be found in look-ups.
Since this is tightly coupled to supervision, the plan of managing /user
and /system actors in special ConcurrentHashMaps did not succeed: the
actor might not yet be supervised when the system is stopped, which
would orphan it; or a look-up directly following its creation would
return deadLetters. Since all of this is not desirable, I changed the
strategy to sending the props and name to the respective supervisor, let
it create the child and hand it back, i.e. I’m using ask/get with
ActorTimeout. This is okay since top-level should not be created at MHz
rate (will have to document this, though).

- also fix one expected exception in TypedActorSpec and the names of
  configured routers
2011-12-03 22:25:18 +01:00
Roland
1755aedb58 make scheduler shutdown more stringent
- run closeScheduler upon ActorSystem termination (directly)
- this will execute all outstanding tasks (dispatcher shutdowns have
  been queued already, because the last actor has already exited)
- further use of the scheduler (e.g. from tasks just being run) results
  in IllegalStateException
- catch such exceptions in DefaultPromise&MessageDispatcher in case of
  self-rescheduling tasks and execute final action immediately
- also silently stop recurring tasks
2011-12-03 21:26:32 +01:00
Roland
ed4e302d2a make HashedWheelTimer reliably shutdown
- make “shutdown” a normal boolean
- use lock.readLock() whenever reading “shutdown”
- use lock.writeLock() when setting it to true
- throw IllegalStateException whenever no-queue
2011-12-03 21:17:22 +01:00
Roland
4c1d722398 fix bug in ActorRef.stop() implementation
- it was telling all children to stop(), then waited for the
  ChildTerminated messages and finally terminated itself
- this worked fine, except when the stop came from the supervisor, i.e.
  the recipient was suspended and did not process the ChildTerminated
- so, as the mirror of Supervise() that it is, I changed
  ChildTerminated() to be a system message and instead of stopping
  processing normal messages by checking the stopping flag, just suspend
  the actor while awaiting the ChildTerminated's to flow in.
2011-12-03 18:53:04 +01:00
Roland
3d0bb8b415 implement ActorSeletion and document ActorRefFactory
- implementation of this cool feature is now astonishingly simple:
  context.actorSelection("child/*") ! msg
- docs propagate to ActorSystem/ActorContext
2011-12-03 17:39:52 +01:00
Roland
79e5c5d0d1 implement coherent actorFor look-up
- look-up of all actor paths in the system, even “synthetic” ones like
  “/temp”
- look-up by full URI (akka://bla/...), absolute or relative path
- look-up by ActorPath
- look-up by path elements
- look-up relative to context where applicable, supporting ".."
- proper management of AskActorRef

Have a look at ActorLookupSpec to see what it can do.
2011-12-03 12:23:23 +01:00
Viktor Klang
95791ce4c5 #1424 - RemoteSupport is now instantiated from the config, so now anyone can write their own Akka transport layer for remote actors 2011-12-02 18:08:38 +01:00
Viktor Klang
b2ecad1327 Merge branch 'master' of github.com:jboner/akka 2011-12-02 17:47:22 +01:00
Viktor Klang
93d093e87a Commenting out the ForkJoin stuff until I've cleared some bits with Doug Lea 2011-12-02 17:29:47 +01:00
Patrik Nordwall
1f665ab4c6 Changed signatures of Scheduler for better api of by-name blocks 2011-12-02 17:13:46 +01:00
Patrik Nordwall
af1ee4fb5a Utilized the optimized withFallback to simplify config checkValid stuff 2011-12-02 16:08:32 +01:00
Roland
a3e6fca530 rename RefInternals to InternalActorRef and restructure
- IAR is subclass of AR and SAR
- all concrete ARs implement IAR
- move sendSystemMessage to IAR

all in preparation for unifying the ActorPath look-up for local&remote
actor refs
2011-12-02 14:45:10 +01:00
Roland
e38cd19af9 Merge branch 'master' into wip-ActorPath-rk 2011-12-02 13:31:48 +01:00
Roland
cf020d708a rename top-level paths as per Jonas recommendation
/user
/system
/null
/temp
/remote
/service

multi-jvm tests are disabled for the time being until remote look-up has
been really implemented
2011-12-02 12:24:47 +01:00
Patrik Nordwall
db075d094a Updated to latest config lib 38fb8d6 2011-12-02 12:09:10 +01:00
Patrik Nordwall
eebe068aa5 Nice looking toString of config settings. See #1373 2011-12-02 12:09:09 +01:00
patriknw
d85f8d74b8 Merge pull request #134 from jboner/wip-1404-memory-leak-patriknw
Fixed several memory and thread leaks. See #1404
* Dispatchers need Scheduler to be able to shutdown themselves. Stop Scheduler after dispatchers.
* Changed CallingThreadDispatcher global object to Extension, since it holds map of references to mailboxes. Will be GC:ed when system is GC:ed.
* Made testActor lazy, since it is not used in all tests, and it creates CallingThreadDispatcher.
* Activated some java tests that were not running
* Many tests were not stopping created ActorSystems. VERY IMPORTANT TO STOP ActorSystem in tests. Use AkkaSpec as much as possible.
* Used profiler to verify (and find) dangling ActorSystemImpl and threads from dispatchers.
* FutureSpec creates ForkJoinPool threads that are not cleared, but number of threads don't grow so it's not a problem.
2011-12-02 01:34:52 -08:00
Patrik Nordwall
79866e5729 Made DefaultScheduler Closeable 2011-12-02 10:32:17 +01:00
Patrik Nordwall
639c5d6a54 Revert the removal of akka.remote.transport. Will be used in ticket 1424 2011-12-02 10:16:21 +01:00
Patrik Nordwall
b488d70f54 Fixed several memory and thread leaks. See #1404
* Dispatchers need Scheduler to be able to shutdown themselves. Stop Scheduler after dispatchers.
* Changed CallingThreadDispatcher global object to Extension, since it holds map of references to mailboxes. Will be GC:ed when system is GC:ed.
* Made testActor lazy, since it is not used in all tests, and it creates CallingThreadDispatcher.
* Activated some java tests that were not running
* Many tests were not stopping created ActorSystems. VERY IMPORTANT TO STOP ActorSystem in tests. Use AkkaSpec as much as possible.
* Used profiler to verify (and find) dangling ActorSystemImpl and threads from dispatchers.
* FutureSpec creates ForkJoinPool threads that are not cleared, but number of threads don't grow so it's not a problem.
2011-12-02 09:48:21 +01:00
patriknw
035f514843 Merge pull request #131 from jboner/wip-1378-fixme-patriknw
First walk through of FIXME. See #1378
2011-12-02 00:28:20 -08:00
Patrik Nordwall
fd82251501 Minor fixes from review comments. 2011-12-02 09:26:56 +01:00
Patrik Nordwall
82bbca43ab Merge branch 'master' into wip-1378-fixme-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorRef.scala
	akka-remote/src/main/scala/akka/remote/RemoteActorRefProvider.scala
	akka-remote/src/main/scala/akka/remote/netty/NettyRemoteSupport.scala
2011-12-02 09:03:03 +01:00
patriknw
b70faa4e42 Merge pull request #129 from jboner/wip-config-patriknw
Updated to latest config lib and changed how reference config files are loaded.
* Config lib 4f3a91f
* All reference files named reference.conf, all will be loaded
* Usage of ConfigFactor.load as default way
* Extensions use same config as ActorSystem.settings.config
2011-12-01 23:53:49 -08:00
Patrik Nordwall
66bf11681c Changed config.toValue -> config.root 2011-12-02 08:51:51 +01:00
Patrik Nordwall
c5a367ad54 Merge branch 'master' into wip-config-patriknw 2011-12-02 08:49:34 +01:00
Viktor Klang
d626cc2455 Removing suspend and resume from user-facing API 2011-12-02 01:27:42 +01:00
Viktor Klang
879ea7c2b4 Removing startsWatching and stopsWatching from docs and removing cruft 2011-12-02 01:04:33 +01:00
Viktor Klang
fcc6169ede Removing the final usages of startsWatching/stopsWatching 2011-12-02 01:00:55 +01:00
Viktor Klang
54e2e9a357 Switching more test code to use watch instead of startsWatching 2011-12-02 00:25:17 +01:00