Github user aweisberg commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/184#discussion_r163106555
--- Diff: src/java/org/apache/cassandra/streaming/StreamResultFuture.java
---
@@ -135,11 +136,13 @@ public StreamCoordinator getCoordinator()
return coordinator;
}
- private void attachConnection(InetAddress from, int sessionIndex,
Channel channel)
+ private void attachConnection(InetAddressAndPort from, int
sessionIndex, Channel channel)
{
SocketAddress addr = channel.remoteAddress();
- InetAddress connecting = (addr instanceof InetSocketAddress ?
((InetSocketAddress) addr).getAddress() : from);
- StreamSession session = coordinator.getOrCreateSessionById(from,
sessionIndex, connecting);
+ InetAddress connecting = (addr instanceof InetSocketAddress ?
((InetSocketAddress) addr).getAddress() : from.address);
+ //Need to turn connecting into a InetAddressAndPort with the
correct port. I think getting the port from "from"
+ //Will work since we don't actually have ports diverge across
network interfaces
+ StreamSession session = coordinator.getOrCreateSessionById(from,
sessionIndex, InetAddressAndPort.getByAddressOverrideDefaults(connecting,
from.port));
--- End diff --
This doesn't look right? Your using the ephemeral port from
SocketChannel.remoteAddress()? That's not a useful port number for anything.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]