second step: remove LocalActorRefProvider.actors
- duplicate name detection done within ActorCell/ActorSystem (i.e. at parent level) - no caching needed for local look-ups, might re-introduce cache in remote layer - implement suitable equals/hashCode on ActorPaths - fix some (unintended => buggy) name reuses which previously silently returned a different actor - serialization & EventStreamSpec still failing, need to commit to merge in other stuff on which the future fixes will depend
This commit is contained in:
parent
dad1c98c48
commit
3182fa3d73
17 changed files with 329 additions and 250 deletions
|
|
@ -152,7 +152,7 @@ class ActiveRemoteClient private[akka] (
|
|||
val handshake = RemoteControlProtocol.newBuilder.setCommandType(CommandType.CONNECT)
|
||||
if (SecureCookie.nonEmpty) handshake.setCookie(SecureCookie.get)
|
||||
handshake.setOrigin(RemoteProtocol.AddressProtocol.newBuilder
|
||||
.setHostname(senderRemoteAddress.hostname)
|
||||
.setHostname(senderRemoteAddress.host)
|
||||
.setPort(senderRemoteAddress.port)
|
||||
.build)
|
||||
connection.getChannel.write(remoteSupport.createControlEnvelope(handshake.build))
|
||||
|
|
@ -166,7 +166,7 @@ class ActiveRemoteClient private[akka] (
|
|||
|
||||
def attemptReconnect(): Boolean = {
|
||||
log.debug("Remote client reconnecting to [{}]", remoteAddress)
|
||||
val connection = bootstrap.connect(new InetSocketAddress(remoteAddress.hostname, remoteAddress.port))
|
||||
val connection = bootstrap.connect(new InetSocketAddress(remoteAddress.ip, remoteAddress.port))
|
||||
openChannels.add(connection.awaitUninterruptibly.getChannel) // Wait until the connection attempt succeeds or fails.
|
||||
|
||||
if (!connection.isSuccess) {
|
||||
|
|
@ -189,7 +189,7 @@ class ActiveRemoteClient private[akka] (
|
|||
|
||||
log.debug("Starting remote client connection to [{}]", remoteAddress)
|
||||
|
||||
connection = bootstrap.connect(new InetSocketAddress(remoteAddress.hostname, remoteAddress.port))
|
||||
connection = bootstrap.connect(new InetSocketAddress(remoteAddress.ip, remoteAddress.port))
|
||||
|
||||
val channel = connection.awaitUninterruptibly.getChannel
|
||||
openChannels.add(channel)
|
||||
|
|
@ -512,7 +512,7 @@ class NettyRemoteServer(val remoteSupport: NettyRemoteSupport, val loader: Optio
|
|||
bootstrap.setOption("child.reuseAddress", true)
|
||||
bootstrap.setOption("child.connectTimeoutMillis", ConnectionTimeout.toMillis)
|
||||
|
||||
openChannels.add(bootstrap.bind(new InetSocketAddress(address.hostname, address.port)))
|
||||
openChannels.add(bootstrap.bind(new InetSocketAddress(address.ip, address.port)))
|
||||
remoteSupport.notifyListeners(RemoteServerStarted(remoteSupport))
|
||||
|
||||
def shutdown() {
|
||||
|
|
@ -645,7 +645,8 @@ class RemoteServerHandler(
|
|||
instruction.getCommandType match {
|
||||
case CommandType.CONNECT if UsePassiveConnections ⇒
|
||||
val origin = instruction.getOrigin
|
||||
val inbound = RemoteAddress(origin.getHostname, origin.getPort)
|
||||
// FIXME need to include system-name in remote protocol
|
||||
val inbound = RemoteAddress("BORKED", origin.getHostname, origin.getPort)
|
||||
val client = new PassiveRemoteClient(event.getChannel, remoteSupport, inbound)
|
||||
remoteSupport.bindClient(inbound, client)
|
||||
case CommandType.SHUTDOWN ⇒ //TODO FIXME Dispose passive connection here
|
||||
|
|
@ -664,7 +665,7 @@ class RemoteServerHandler(
|
|||
|
||||
private def getClientAddress(c: Channel): Option[RemoteAddress] =
|
||||
c.getRemoteAddress match {
|
||||
case inet: InetSocketAddress ⇒ Some(RemoteAddress(inet))
|
||||
case inet: InetSocketAddress ⇒ Some(RemoteAddress("BORKED", inet.getHostName, inet.getPort)) // FIXME Broken!
|
||||
case _ ⇒ None
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue