Skip to content

Use doOnDiscard to free internally queued data buffers [SPR-17246] #21779

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

Closed
spring-projects-issues opened this issue Sep 5, 2018 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Sep 5, 2018

Arjen Poutsma opened SPR-17246 and commented

We should leverage the upcoming Reactor core feature onDiscardQueueWithClear to free the internally queued DataBuffer instances when the publisher is cancelled or terminated on an error (see reactor core pr #1155).

This issue was initially part of #21563.


Issue Links:

Referenced from: commits 8a48353

@spring-projects-issues
Copy link
Collaborator Author

Arjen Poutsma commented

See reactor/reactor-core@0dc8be2 for a more recent version of the discard hook.

@spring-projects-issues
Copy link
Collaborator Author

Arjen Poutsma commented

Implemented in 8a48353

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

Arjen Poutsma, shouldn't we be doing this on all the other places where expose Flux<DataBuffer> from Reactor and Undertow, i.e. in ClientHttpResponse#getBody() and WebSocketSession#receive()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants