Commit graph

1080 commits

Author SHA1 Message Date
Thibaut Robert
12cbf83927 =rem improve remote watching mechanism
This improves the remote watching mechanism as follows: Watch requests
are intercepted by the RemoteWatcher and not sent on the wire,
excepted watches from the remoteWatcher itself.

RemoteWatcher is then in charge of forwarding DeathWatchNotification
messages to the watchers.

This reduces the number of watch message to one per watchee, even if
there are several watcher on the same watchee (instead of n+1 before).

Reversed watch messages, and watch on ref with undefinedUid are excluded from
interception by the RemoteWatcher and so are handled as before this commit.

In addition, the following changes are made:
- Keep watchers in a map watchee -> watchers for more efficient retrieval
(in a scala Multimap)
- Keep watchees in a map address -> watchee for more efficient retrieval
(in a scala Multimap)
- Use of InternalActorRef more thoroughly to avoid casts
- Rewatch use a standard watch message, as the distinction is longer needed
2015-05-13 14:10:35 +02:00
Patrik Nordwall
b30e460be7 = #17342 Make 2.4 binary compatible with 2.3
(cherry picked from commit 89af8bdb90)

* remove final identifier in serializers

i* revert/deprecate ProtobufSerializer.ARRAY_OF_BYTE_ARRAY

* adding back compatible empty constructor in serializers

* make FSM.State compatible

* add back ActorPath.ElementRegex

* revert SocketOption changes and add SocketOptionV2
  see a6d3704ef6

* problem filter for ActorSystem and ActorPath

* problem filter for ByteString

* problem filter for deprecated Timeout methods

* BalancingPool companion

* ask

* problem filter for ActorDSL

* event bus

* exclude hasSubscriptions

* exclude some problems in testkit

* boundAddress and addressFromSocketAddress

* Pool nrOfInstances

* PromiseActorRef

* check with 2.3.9

* migration guide note

* explicit exclude of final class problems
2015-05-11 21:11:52 +02:00
Patrik Nordwall
93d7c0493d Merge pull request #17272 from akka/wip-17240-deadletter-supression-master-patriknw
= #17240 Use some more DeadLetterSuppression (for validation)
2015-04-23 07:13:04 +02:00
Patrik Nordwall
c1d14f1887 = #17240 Use some more DeadLetterSuppression
* sysmsg.Terminate, sysmsg.DeathWatchNotification, io.Tcp.Closed
  were needed to silence normal usage of http client/server
* other things based on jenkins logs, but not a complete audit

(cherry picked from commit 270e3b2f49af3c34fd5ea4c3bcfd8257402b5cbe)
2015-04-22 21:40:23 +02:00
Endre Sándor Varga
1a6f7cc44c =rem #17213: Remove wrong assertion from EndpointManager
(cherry picked from commit 5b6085664ba2d69cd3f5662c1f4b21c417e4afb1)
2015-04-22 21:09:49 +02:00
Patrik Nordwall
0d403311b2 =rem #16346 Close connection after refused connection attempt 2015-04-15 13:46:44 +02:00
drewhk
213a5a4300 Merge pull request #16880 from drewhk/wip-16224-gate-should-open-on-inbound-connect-drewhk
=rem #16224: Not terminate connections if quarantine id do not match
2015-03-26 18:59:04 +01:00
Endre Sándor Varga
a6e10f154f =rem #16224: Not terminate connections if quarantine id do not match 2015-03-26 16:11:48 +01:00
drewhk
d9db42b757 Merge pull request #16884 from drewhk/wip-16505-forwardport-drewhk
=rem #16505: Do not publish AddressTerminated (missing fwd port)
2015-03-25 14:44:15 +01:00
Julian Tescher
00f6a58e7c Changes all occurances of Typesafe copyright to extend to 2015 2015-03-10 14:12:19 -07:00
Andrei Pozolotin
6332f888ce +all #16632 Make serialization identifiers configurable in reference.conf 2015-03-05 11:55:05 -06:00
Endre Sándor Varga
b3f4012746 =rem #16505: Do not publish AddressTerminated
- also not throw IllegalAssocEx from transport
 - added a test for stashing behavior
(cherry picked from commit b7295a8)
2015-02-17 13:40:48 +01:00
Roland Kuhn
d9efd041f7 add akka-typed project with generic ActorRef
This is the first step towards more type-safety in Actor interactions,
comprising:

* generic ActorRef[T] that only accepts T messages
* generic ActorSystem[T] extends ActorRef[T] (sending to the guardian,
  whose Props[T] are provided for ActorSystem construction)
* removed the Actor trait: everything in there has been made into
  messages and signals
* new Behavior[T] abstraction that consumes messages (of type T) or
  Signals (lifecycle hooks, Terminated, ReceiveTimeout, Failed),
  producing the next Behavior[T] as the result each time
* the ask pattern is provided and yields properly typed Futures
* variants of ActorContext are provided for synchronous testing of
  Behaviors

All of this is implemented without touching code outside akka-typed
(apart from making guardianProps configurable), creating wrapper objects
around ActorRef, ActorContext, ActorSystem, Props and providing an Actor
implementation that just runs a Behavior.
2015-01-29 11:42:28 +01:00
Patrik Nordwall
a1d7199a42 =rem #16623: Fix concurrent reliable delivery actors
(cherry picked from commit 4f7c90660226b05edc3581454d18fd53a4762802)

Conflicts:
	project/AkkaBuild.scala
2015-01-19 10:03:40 +01:00
Roland Kuhn
f0be7f8a21 Merge pull request #16429 from hepin1989/master
=rem #16428 optimize protobuf serializer for master
2015-01-15 15:17:37 +01:00
Raul Bache
51f5454581 =act Constant value made a val to avoid unnecessary allocation
Changed the parameter type of targetName in PromiseActorRef#apply and changed so that toString of targetName is called once the value is actually needed, eg in the case of timeout.

The creating of the String used in the AskTimeOutException will then be deferred to when timeouts actually occur rather than before, as it was before this change.

Callsites of PromiseActorRef#apply are changed so that they instead of ActorSel#toString and ActorRef#toString send the ActorSel / ActorRef itself, thus not creating the Strings from toString unless necessary, saving StringBuilders and char[] used in ActorRef#toString and ActorSel#toString
2015-01-07 23:56:02 +01:00
hepin
a19e02b9e5 =rem #16428 optimize protobuf serializer 2014-12-23 01:52:55 +08:00
Ostapenko Evgeniy
dee5ad3deb =act #16361 Added more information to AskTimeoutException 2014-11-27 11:54:02 +03:00
Konrad Malawski
fd498d34a5 Merge pull request #16322 from carrot-garden/name-space-for-loggers
= akka-*: full name space for loggers - resolve #16138
2014-11-19 09:46:15 +01:00
Patrik Nordwall
4c7adf919f Merge pull request #16276 from akka/wip-15530-remote-log-cause-patrikwn
+rem #15530 Include cause in some remote log messages
2014-11-19 07:42:33 +01:00
Andrei Pozolotin
d83acb92c3 = akka-*: full name space for loggers - resolve #16138
reflect logger name changes in the migration guide

fix typo in migration guide

fix typo in migration guide (xml)
2014-11-18 09:17:07 -06:00
Björn Antonsson
1a5007009d =rem #16241 Added helpful message for remoting startup timeout. 2014-11-11 10:00:49 +01:00
Patrik Nordwall
4a505cdc81 +rem #15530 Include cause in some remote log messages 2014-11-11 08:15:37 +01:00
Konrad 'ktoso' Malawski
3f12ef262f !clu #15042 useRole restriction on local node is now respected
This is an API breaking change if someone implemented their own Routers.
The change is required because the router must know if the local routees
should be started or not so it has to check the roles of the cluster
member (the local one). We could delay this decision of starting local
routees, but that would allow messages to be dead-letter-ed (bad).
2014-10-31 22:33:23 +01:00
Martynas Mickevicius
47556a0ebf =rem #15007 add ability to bind to a different address than the remoting waits messages from
This can be used to traverse NATs with the following configuration:

akka.remote.netty.tcp {
  ...
  hostname = my-external-address.lt
  bind-hostname = 192.168.1.100
}

Use Akka BoundAddressesExtension to get bound addresses
2014-09-15 18:30:12 +03:00
Roland Kuhn
1eda0d9b23 =act,clu,rem #15828 Turkish I bug
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/ClusterSettings.scala
2014-09-09 10:05:19 +02:00
Konrad 'ktoso' Malawski
f13d4975cc =act,rem #13946 fix handling of null parameters in Props
+ Props creation with nulls does not fail any longer
+ null values are now serialised properly and can be used in remote
  deployments too
+ added tests for Reflect.findConstructor
> does not change wire protocol, so that's open for discussion (if we
> want it to be more like SerialisedMessage or not)

Resolves #13946
2014-09-01 13:33:16 +02:00
Viktor Klang
b8c634451f +act - 15757 - Changes the signature of ActorSystem.terminate() and ActorSystem.whenTerminated() to be of Future[Terminated] iso Future[Unit] 2014-08-26 10:57:47 +02:00
Patrik Nordwall
0fd9198f5d +act #13992 Improve identify replies of wildcard selections
(cherry picked from commit 4747b18d66fafb5699168288b09b7f39da5c2e4e)

Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorSelection.scala
	project/AkkaBuild.scala
2014-06-23 12:19:03 +02:00
Csongor Somogyi
5e978220a5 =rem #13923 Fixes hanging ActorSystem termination
* occurs on failed RemoteActorRef initialization
* fixed shutting down Netty when startup fails
* fixed registering ActorSystem's termination hook before ActorRefProvider
  initialization
* added new test case (checking if no threads left after a failed actor
  system initialization)
2014-05-30 13:43:37 +02:00
Endre Sándor Varga
0e46db47d9 =rem #15109: Separate field in Pass for refuseUid
- Fixes #15109
  - also fix GotUid race with InvalidAddress supervision event
(cherry picked from commit 3fe83fa)
2014-05-15 14:33:16 +02:00
Patrik Nordwall
a97de7db90 =rem #13960 #13989 #13742 #13985 Optimize EndpointWriter
* Replace stash with internal bufferi, j.u.LinkedList
* Replace FSM with become
* Adaptive backoff, important to backoff, but not for too long,
  depends on environment and use case
* Prioritize heartbeat messages from remote watcher and cluster
  failure detector
* Use payload messages as heartbeats for transport failure detector,
  change transport failure detector to be based on absolute timeout,
  see ticket #13989 and #13742
* Log remote disassociate from transport failure detector,
  see ticket #13985
* Add benchmark sample in akka-sample-remote-scala
2014-04-24 13:39:58 +02:00
Björn Antonsson
f7b0c49045 =rem #3967 Handle refused connections as association failures 2014-04-07 15:27:17 +02:00
Endre Sándor Varga
f69a94a3f4 =rem 3933: Quarantine piercing should not lose quarantine marker
(cherry picked from commit 7c8160b)
2014-03-25 15:10:45 +01:00
Roland Kuhn
b97a257f9a =rem #3930 part 2: track UID of associated systems
for proper clean-up of the old association (including the writer) when
the restarted system connects before the old association has been torn
down
2014-03-21 20:43:14 +01:00
Roland Kuhn
cada750240 =act,rem #3930 part 1: remote daemon watches parents
also stop child actors which are replaced in VirtualPathContainers
2014-03-21 20:43:13 +01:00
Patrik Nordwall
514e0cc297 !rem #3920 Remove LogRemoteLifecycleEvents 2014-03-14 14:12:36 +01:00
Patrik Nordwall
1e445b4eba !act,rem,clu #3920 Remove deprecated old routers 2014-03-14 14:12:11 +01:00
Patrik Nordwall
67925cb94e =act, rem #2556 Optimize subscriptions of AddressTerminated
* unsubscribe in eventStream is too slow when using many actors
  that are watching remote actors, and becomes a problem for example
  when shutting down such a system
* Previous eventStream solution:
  Stopping 20000 actors took 50355 ms
* This solution:
  Stopping 20000 actors took 764 ms
2014-03-12 10:17:34 +01:00
dario.rexin
2cbad298d6 =all #3858 Make case classes final 2014-03-07 13:20:01 +01:00
Björn Antonsson
51f9501a0d Merge pull request #2049 from drewhk/wip-3787-loglevel-fix-forwardport-drewhk
=rem #3787: Fix wrong loglevels in remote events logging
2014-03-04 13:36:17 +01:00
Roland Kuhn
b5eeb08fde +act #3900 make systemActorOf available to Extensions 2014-03-03 12:00:25 +01:00
Endre Sándor Varga
824e4b4666 =rem #3787: Fix wrong loglevels in remote events logging (forward port) 2014-02-28 15:20:28 +01:00
Endre Sándor Varga
e69d068cc0 =rem #3879: Stop sysmsg redelivery for unknown systems after a timeout 2014-02-19 14:44:19 +01:00
Patrik Nordwall
1e86e6436b Merge pull request #2007 from akka/wip-3870-stop-redelivery-to-unknown-patriknw
=rem #3870 Stop re-delivery of system messages when watching non-existing sys
2014-02-13 12:54:46 +01:00
Patrik Nordwall
aa6bdd197e =rem #3870 Stop re-delivery of system messages when watching non-existing sys
* We don't know the UID so we can't quarantine, but we can stop the endpoint
  writer and drop outstanding system messages
2014-02-13 11:27:53 +01:00
Patrik Nordwall
35b1d6879a =rem #3867 Make sure endpointWriter is terminated before ungate
* actor name [endpointWriter] is not unique
* The problem was that the test used 100ms until ungate and
  that made it possible for the endpointWriter to not be
  completely terminated (and removed) before Ungate and
  new Send in idle state, which created new endpointWriter
* I could reproduce it with a sleep in EndpointWriter.postStop
* The solution is to start the scheduled Ungate after Terminated
  has been received
2014-02-10 14:41:48 +01:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Patrik Nordwall
615c6b572c =* #2966 Reduce warnings from compile, test, scaladoc 2014-01-24 11:47:57 +01:00
Patrik Nordwall
4b843476ef =clu,rem #3632 Correct wrong transport in docs 2014-01-21 15:14:27 +01:00