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

http2: support Strict entities in Http2SubStream #3824

Merged
merged 2 commits into from Jun 4, 2021

Conversation

jrudolph
Copy link
Member

@jrudolph jrudolph commented Jun 1, 2021

This avoids materializing a stream for outgoing Strict entities.

Another ready result from #3822.

@jrudolph
Copy link
Member Author

jrudolph commented Jun 1, 2021

Needs tests

@jrudolph
Copy link
Member Author

jrudolph commented Jun 1, 2021

Needs tests

Actually, it cannot be observed from the outside, so I guess no particular tests are necessary. There are tests that examine sending Strict entities in general.

@jrudolph jrudolph force-pushed the support-strict-entities-in-substream branch from e5d5076 to 5612e4e Compare June 1, 2021 13:21
@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed validating PR that is currently being validated by Jenkins labels Jun 1, 2021
@akka-ci
Copy link

akka-ci commented Jun 1, 2021

Test PASSed.


var httpFlow: Flow[ByteString, ByteString, Any] = _
implicit var system: ActorSystem = _
implicit var mat: ActorMaterializer = _

val packedResponse = ByteString(-62, -63, -64, -65, -66)
val packedResponse = ByteString(1, 5, 0, 0) // a HEADERS frame with end_stream == true
Copy link
Member

Choose a reason for hiding this comment

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

Nice

// TODO: Check that buffer is not too much over the limit (which we might warn the user about)
// The problem here is that backpressure will only work properly if batch elements like
// ByteString have a reasonable size.
if (buffer.size < multiplexer.maxBytesToBufferPerSubstream && !inlet.hasBeenPulled && !inlet.isClosed) inlet.pull()
}
if (!upstreamClosed && buffer.size < multiplexer.maxBytesToBufferPerSubstream && !inlet.hasBeenPulled && !inlet.isClosed) inlet.pull()
Copy link
Member

Choose a reason for hiding this comment

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

👍

@raboof raboof merged commit 8a4e7f7 into akka:master Jun 4, 2021
@jrudolph jrudolph deleted the support-strict-entities-in-substream branch June 7, 2021 08:44
@jrudolph jrudolph added this to the 10.2.5 milestone Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants