Skip to content

Review DataBuffer handling code for proper release in case of error or cancellation [SPR-17408] #21941

Closed
@spring-projects-issues

Description

@spring-projects-issues

Rossen Stoyanchev opened SPR-17408 and commented

Recent, related efforts on this topic include #21563, #21779, and #21322, but those changes needs some refinement plus a comprehensive review of all DataBuffer handling code with an eye towards error and cancellation signal cases.

This is an umbrella ticket with sub-tasks:

  1. Review DataBufferUtils [SPR-17411] #21944 DataBufferUtils.
  2. Review DataBuffer handling in Servlet and Undertow server adapters [SPR-17410] #21943 ReactorServerHttpRequest to drop the onDiscard hook.
  3. Review DataBuffer handling in Servlet and Undertow server adapters [SPR-17410] #21943 Reactive Streams bridge in spring-web (Servlet, Undertow, HTTP and WebSocket).
  4. Review decoders and message readers [SPR-17418] #21951 Decoders and message readers.
  5. Review encoders and message writers [SPR-17419] #21952 Encoders and message writers.
  6. Review Jetty ClientHttpConnector code for buffer handling on error/cancellation [SPR-17424] #21957 Jetty ClientHttpConnector.
  7. Improve guidance on working with and releasing DataBuffer's [SPR-17409] #21942 Update docs for releasing data buffers on error/cancellation.

For 4) and 5) above, perhaps we should consider inserting a common onDiscard at the point of using codecs to ensure consistent behavior? Of course individual codecs still need to be able to do the right thing on their own, but perhaps a hint could be passed in to indicate when onDiscard is handled externally..

 


Affects: 5.0.10, 5.1.1

Sub-tasks:

Issue Links:

Referenced from: commits 149d416, 488a1d4

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions