Skip to content

pool: emit firefly onStart marker from RemoteHttpDataTransferProtocol#8069

Open
kofemann wants to merge 1 commit into11.2from
pr8055-11.2
Open

pool: emit firefly onStart marker from RemoteHttpDataTransferProtocol#8069
kofemann wants to merge 1 commit into11.2from
pr8055-11.2

Conversation

@kofemann
Copy link
Copy Markdown
Member

Move the firefly flow-start marker emission from
AbstractMoverProtocolTransferService.MoverTask into RemoteHttpDataTransferProtocol, where the actual HTTP connection's local socket address (correct IP and port) is available.

Previously, the start marker was emitted in MoverTask.run() before the HTTP connection was established, using NetworkUtils.getLocalAddress() to derive the local endpoint. This produced the wrong port (0) and could select the wrong interface on multi-homed hosts.

Now, RemoteHttpTransferService passes the TransferLifeCycle to RemoteHttpDataTransferProtocol at construction time and sets the Subject via the overridden createMover(). The protocol calls onStart() in doGet() and sendFile() immediately after capturing the local endpoint from HttpInetConnection, which provides the real bound address and port.

(cherry picked from commit 07fb840)

Move the firefly flow-start marker emission from
AbstractMoverProtocolTransferService.MoverTask into
RemoteHttpDataTransferProtocol, where the actual HTTP connection's
local socket address (correct IP and port) is available.

Previously, the start marker was emitted in MoverTask.run() before
the HTTP connection was established, using NetworkUtils.getLocalAddress()
to derive the local endpoint. This produced the wrong port (0) and
could select the wrong interface on multi-homed hosts.

Now, RemoteHttpTransferService passes the TransferLifeCycle to
RemoteHttpDataTransferProtocol at construction time and sets the
Subject via the overridden createMover(). The protocol calls
onStart() in doGet() and sendFile() immediately after capturing the
local endpoint from HttpInetConnection, which provides the real
bound address and port.

Signed-off-by: Shawn McKee <smckee@umich.edu>
(cherry picked from commit 07fb840)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants