Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TransportChannel#sendResponse refcount-neutral #102600

Closed
DaveCTurner opened this issue Nov 24, 2023 · 2 comments
Closed

Make TransportChannel#sendResponse refcount-neutral #102600

DaveCTurner opened this issue Nov 24, 2023 · 2 comments
Labels
:Distributed/Network Http and internode communication implementations Team:Distributed Meta label for distributed team >tech debt

Comments

@DaveCTurner
Copy link
Contributor

Today (most) implementations of TransportChannel#sendResponse will decRef() the response after it is fully sent, but in practice this turns out to encourage some fragile code patterns. In #102551 we introduced a workaround to make ChannelActionListener refcount-neutral, and therefore interchangeable with other listeners, but really ChannelActionListener shouldn't care about refs and we should make TransportChannel#sendResponse itself refcount-neutral. In particular note that OutboundHandler#sendRequest is already refcount-neutral, but OutboundHandler#sendResponse is not, and this is pretty weird.

@DaveCTurner DaveCTurner added :Distributed/Network Http and internode communication implementations >tech debt labels Nov 24, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team label Nov 24, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@DaveCTurner
Copy link
Contributor Author

Closed by #104044

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Network Http and internode communication implementations Team:Distributed Meta label for distributed team >tech debt
Projects
None yet
Development

No branches or pull requests

2 participants