- do not use futures, do not use different executors
- only use Poll token; schedule OR poller.poll in case of no message
available, depending on the sign of the poll timeout
- restructure receive method to avoid PartialFunction.orElse overhead
* 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
* Changed signatures and constructor of MessageDispatcherConfigurator
* Changed Dispatchers.lookup, keep configurators instead of dispatchers
* Removed most of the Dispatchers.newX methods, newDispatcher is still there because of priority mailbox
* How should we make it easy to configure priority mailbox?
* Changed tons tests
* Documentation and ScalaDoc is not updated yet
* Some tests in ActorModelSpec are temporary ignored due to failure
* Added JavaActorContext, UntypedActor.getContext
* implicit val context in Actor needs to be implicit to support forward,
it would be nice if it wasn't implicit because now I can't override context
in UntypedActor
* Removed implicit def system in Actor
* Removed implicit def defaultTimeout in Actor
* Removed receiveTimeout, children, dispatcher, become, unbecome, watch,
unwatch in Actor
* Removed corresponding as above from UntypedActor
* Removed implicit from dispatcher in ActorSystem
* Removed implicit def timeout in TypedActor
* Changed receiveTimeout to use Duration (in api)
* Changed many tests and samples to match new api
* 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.
* Split config reference to one for each module/extension.
* Adjusted signature of registerExtension to avoid race of extension init
* Moved Duration.dilated to testkit
* TestKitExtension
* RemoteExtension
* SerializationExtension
* Durable mailboxes extensions
* Fixed broken serialization bindings and added test
* Updated configuration documentation
* System properties akka.remote.hostname akka.remote.port replaced with akka.remote.server.hostname and akka.remote.server.port
* Adjustments of ActorSystem initialization. Still don't like the two-phase constructor/init flow. Very fragile for changes.
Review fixes. SerializationExtension
- ensure that no “complex” things are attached to a LogEvent (think
serialization)
- ensure no escaping the “this” reference via LoggingBus during
constructors (e.g. ActorSystem)
- change it so that
+ Actor/ActorRef are represented by their address
+ Class[_] by simpleName
+ String by itself
- this means that people need to think a little more while deciding how
“this” should look like in logging (which I think is a good thing)
- create ActorSystemImpl trait to make ActorSystem fully abstract
- add Java API for constructing (ActorSystem.create(...))
- only go through factory methods because .start() has become necessary
- rename all user-facing occurrences of “app” to “system” (Actor trait
and TestKit/AkkaSpec)
- pass ActorSystemImpl to ActorRefs upon creation, which means that
actorOf() and friends need such an argument, which must be provided to
the ActorRefProvider by the ActorRefFactory implementation
(cascading into all dispatchers, mailboxes, other stuff; had to move
deadLetter stuff to ActorSystem again and split its initialization due
to cyclic dependency)
- 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
- 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
- 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
- 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.
BalancingDispatcherModelSpec is currently broken, leaves count==1 in
wavesOfActors test, committed anyway in order to check out where it
broke before this merge
- fix memory visibility issue with occurrences counter
- add non-throwing awaitCond and use that for better error reporting
- move occurrence book-keeping (side-effect) out of PF guard, was
evaluated multiple times (of course!)
- apply in cases where EventFilter.custom was used (one legitimate use
case remains)
- make normal filters available for all four log levels
- allow filtering for
+ exact and complete message
+ start of message
+ regular expression
- keep count of occurrences if requested and verify correct count at end
of filterEvents/filterExceptions block
- remove akka.testkit.Testing (sleepFor replaced by Duration.dilated.sleep)
- remove Duration.timeFactor (needs config -> AkkaApplication)
- TestLatch needs config -> AkkaApplication (was forgotten because used
directly System.getProperty)
- lots of scaladoc for TestEventListener infrastructure
- revise timings to make them more robust (granularity changed in
general from 100ms to 500ms)
- make one test more deterministic by awaiting context.hasMessages,
which has been added for this purpose; is the same kind of “non-racy”
as isShutdown
- add static version of TestKit.awaitCond (checked that it does not
conflict, even when “import TestKit._” is used; seems like imports are
not even searched if the symbol is found locally)
most tests passing, everything compiling, but docs not updated and nasty
thread-leak preventing me from running the whole test-suite (which is
the reason for this commit: I want to chase down that one first).
- the app.mainbus is classified by Class[_] (currently lookup, will
possibly change to sub-class-aware) and accepts AnyRef messages
- LoggingBus handles akka.event-handlers from config specially:
+ start them as system services, supervised by SystemGuardian
+ keep their subscriptions in sync when logLevel_= is called
+ send them InitializeLogger(bus) message before subscribing them (so
they can register for extras like Mute/UnMute)
- two-phased start-up: first phase with actor-less stdout logging, then
subscription of config loggers, then remove stdout logger (logLevels
configurable separately)
- MainBusReaper watches registered receivers and unsubscribes them upon
death (started in phase 2)
- logger factory on Logging object, needs app/bus and log source;
default instance in app.log
- every actor is now supervised, where the root of the tree is
app.guardian, which has its supervisor field set to a special ActorRef
obtained from provider.theOneWhoWalksTheBubblesOfSpaceTime (this name
is meant to indicate that this ref is outside of the universe, cf.
Michio Kaku)
- changed all tests to obtain specially supervised children (i.e. not
top-level) via (supervisor ? Props).as[ActorRef].get
- add private[akka] ScalaActorRef.sendSystemMessage for sending
Supervise()
- everything routing or remote is broken wrt. supervision, as that was
not “properly” implemented to begin with, will be tackled after
app/supervision/eventbus/AkkaSpec are stabilized enough