http2: allows the capacity to increase with SETTINGS frame#19161
http2: allows the capacity to increase with SETTINGS frame#19161alyssawilk merged 7 commits intoenvoyproxy:mainfrom
Conversation
|
@alyssawilk PTAL:) |
alyssawilk
left a comment
There was a problem hiding this comment.
Huzzah! Thanks so much for picking up this series of changes. Couple of ideas below
/wait
source/common/http/conn_pool_base.cc
Outdated
| // currentUnusedCapacity() to be explicit int32_t | ||
| ASSERT(std::numeric_limits<int32_t>::max() >= old_unused_capacity); | ||
| concurrent_stream_limit_ = settings.maxConcurrentStreams().value(); | ||
| if (configured_stream_limit_ > settings.maxConcurrentStreams().value()) { |
There was a problem hiding this comment.
any reason to not set
concurrent_stream_limit_ = std::min(settings.maxConcurrentStreams().value(), configured_stream_limit_) ? I think it's a bit easier to read?
source/common/http/conn_pool_base.cc
Outdated
| void MultiplexedActiveClientBase::onSettings(ReceivedSettings& settings) { | ||
| if (settings.maxConcurrentStreams().has_value() && | ||
| settings.maxConcurrentStreams().value() < concurrent_stream_limit_) { | ||
| if (settings.maxConcurrentStreams().has_value()) { |
There was a problem hiding this comment.
I think we should runtime guard this change as described in CONTRIBUTING.md
| closeAllClients(); | ||
| } | ||
|
|
||
| TEST_F(Http2ConnPoolImplTest, IncreaseCapacityWithSettingsFrame) { |
There was a problem hiding this comment.
it would be good to integration test this as well.
I think you could move TEST_P(QuicHttpIntegrationTest, NoInitialStreams) { to the protocol integration test, and updateConcurrentStreams / sendSettings based on HTTP/3 vs HTTP/3?
There was a problem hiding this comment.
If I understand correctly, do you mean move NoInitialStreams to protocol_integration_test.cc and let it test both HTTP2 and HTTP3? It seems a bit complicated, could I open another PR to implement it after dig a little deeper :)
There was a problem hiding this comment.
I'd definitely like to make sure we integration test incrementing settings with this change. Alternately you can land this false by default with a TODO to flip true with integration testing, but I don't think adapting the test is too complicated so I think it makes more sense to land the test now. I'm happy to help if you get stuck!
There was a problem hiding this comment.
Get it, let me do some research to get familiar with the integration test framework :)
|
@alyssawilk updated! But I only write a integration test for http2. There two issues for
|
|
Thanks for the integration test! |
322734a to
21f83e0
Compare
|
@alyssawilk Already use What weired is the test cases never fail in my local environment with test command Have any ideas? |
|
hm, not sure. the test/integration/README file has instructions which can help if test failures are due to slow CI machines - you could try that? |
Still don't know why :( Is there any way to pass "-l trace" to CI script, so I could get the verbose log from CI output rather than just error output. |
|
well you can tweak the CI scripts to do that but honestly I usually use the test mock code to only beef up logging in the test case which fails. like if you know what part of the test fails you can put that code in |
5fc69c2 to
401cacb
Compare
fd4d950 to
217b9f8
Compare
bdc5223 to
316f20f
Compare
|
@alyssawilk PTAL! I think the |
alyssawilk
left a comment
There was a problem hiding this comment.
Looks great! I think the 2 test failures aren't yours :-)
Just because the logic is finicky I'm going to hold this until the release is cut tomorrow (which will require one more merge since the version history file will change)
|
release is in! one final sync and you should be good to go. Thanks again for your patience here! |
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
Signed-off-by: YaoZengzeng <[email protected]>
|
@alyssawilk synced! |
alyssawilk
left a comment
There was a problem hiding this comment.
Awesome! Thanks again both for tackling this change and all your patience getting the tests working and code merged!
…y#19161) Commit Message: allows the capacity of http2 connection to increase with SETTINGS frame Additional Description: fixes envoyproxy#18880 Risk Level: medium Testing: unit Docs Changes: n/a Signed-off-by: YaoZengzeng <[email protected]> Signed-off-by: Josh Perry <[email protected]>
Signed-off-by: YaoZengzeng [email protected]
Commit Message: allows the capacity of http2 connection to increase with SETTINGS frame
Additional Description: fixes #18880
Risk Level: medium
Testing: unit
Docs Changes: n/a