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

Respect SubscriptionOption.WITH_POOLED_OBJECTS in PublisherBasedStreamMessage #3617

Merged
merged 3 commits into from
Jun 14, 2021

Conversation

minwoox
Copy link
Contributor

@minwoox minwoox commented Jun 6, 2021

…reamMessage`

Motivation:
The implementations of StreamMessage in Armeria are in charge of releasing the pooled objects
when the subscriber subscribes without the WITH_POOLED_OBJECTS option.
However, PublisherBasedStreamMessage currentyly ignores WITH_POOLED_OBJECTS option.
We should respect that so that the subscriber does not have to deal with when it does not specify
WITH_POOLED_OBJECTS option.

Modifications:

  • Respect SubscriptionOption.WITH_POOLED_OBJECTS in PublisherBasedStreamMessage.
    • The Subscriber who does not specify WITH_POOLED_OBJECTS when subscribing does not have to release
      the pooled objects by itself anymore.

Result:

…reamMessage`

Motivation:
The implementations of `StreamMessage` in Armeria are in charge of releasing the pooled objects
when the subscriber subscribes without the `WITH_POOLED_OBJECTS` option.
However, `PublisherBasedStreamMessage` currentyly ignores `WITH_POOLED_OBJECTS` option.
We should respect that so that the subscriber does not have to deal with when it does not specify
`WITH_POOLED_OBJECTS` option.

Modifications:
- Respect `SubscriptionOption.WITH_POOLED_OBJECTS` in `PublisherBasedStreamMessage`.
  - The Subscriber who does not specify `WITH_POOLED_OBJECTS` when subscribing does not have to release
    the pooled objects by itself anymore.

Result:
- Close line#3608
  - You can use Spring WebFlux integration with compression enabled.
- You do not have to release the pooled objects when subscribing `PublisherBasedStreamMessage`
  without `WITH_POOLED_OBJECTS` option.
@minwoox minwoox added the defect label Jun 6, 2021
@minwoox minwoox added this to the 1.9.0 milestone Jun 6, 2021
@minwoox minwoox requested review from ikhoon and trustin as code owners June 6, 2021 14:44
@minwoox
Copy link
Contributor Author

minwoox commented Jun 6, 2021

Thanks, @ikhoon who gave this idea to fix the leak. 😄

Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! @minwoox

@@ -223,6 +223,7 @@ ad
ad.jp
adac
adachi.tokyo.jp
adimo.co.uk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert?

@trustin trustin changed the title Respect SubscriptionOption.WITH_POOLED_OBJECTS in `PublisherBasedSt… Respect SubscriptionOption.WITH_POOLED_OBJECTS in PublisherBasedStreamMessage Jun 14, 2021
@trustin trustin merged commit 5bd7af0 into line:master Jun 14, 2021
@minwoox minwoox deleted the publisherBasedPooledObjects branch June 14, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spring-webflux LEAK: ByteBuf.release() when "server.compression.enabled=true"
3 participants