Repository navigation
quic: refactor QuicPersistentInfoImpl - #20051
Conversation
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
@RyanTheOptimist This is good for review! |
|
Now that #19860 has been merged, can you update this PR to merge in main? |
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
CI cleared. PTAL! |
RyanTheOptimist
left a comment
There was a problem hiding this comment.
Thanks for rebasing! So much easier to review. This looks good modulo just a few nits.
| getConfig(Network::TransportSocketFactory& transport_socket_factory) { | ||
| auto* quic_socket_factory = | ||
| dynamic_cast<Quic::QuicClientTransportSocketFactory*>(&transport_socket_factory); | ||
| ASSERT(quic_socket_factory != nullptr); |
There was a problem hiding this comment.
Since transport_socket_factory is a reference, it's guaranteed to be non-null. How 'bout we stick with refs and do this:
return dynamic_cast<Quic::QuicClientTransportSocketFactory&>(transport_socket_factory).clientContextConfig();
This avoids the local variable and the ASSERT().
|
|
||
| // Returns the most recent crypto config from transport_socket_factory_; | ||
| std::shared_ptr<quic::QuicCryptoClientConfig> cryptoConfig(); | ||
| PersistentQuicInfoImpl(Event::Dispatcher& dispatcher, uint32_t buffer_limit); |
There was a problem hiding this comment.
Nit: as long as you're here, would you mind commenting on what |buffer_limit| applies to? (Is it a per stream or per session flow control limit?)
There was a problem hiding this comment.
It's the connection send buffer (soft) limit. I modified the comment about buffer_limit_ member variable to be more specific.
|
|
||
| std::shared_ptr<quic::QuicCryptoClientConfig> Http3ConnPoolImpl::cryptoConfig() { | ||
| auto* quic_socket_factory = | ||
| dynamic_cast<Quic::QuicClientTransportSocketFactory*>(&host_->transportSocketFactory()); |
There was a problem hiding this comment.
nit: if we cast to Quic::QuicClientTransportSocketFactory& I think we can avoid the null check and local variable
| auto* quic_socket_factory = | ||
| dynamic_cast<Quic::QuicClientTransportSocketFactory*>(&host_->transportSocketFactory()); | ||
| ASSERT(quic_socket_factory != nullptr); | ||
| auto context = quic_socket_factory->sslCtx(); |
There was a problem hiding this comment.
nit: I think the style guide would recommend using the explicit type name here.
The fundamental rule is: use type deduction only to make the code clearer or safer, and do not use it merely to avoid the inconvenience of writing an explicit type. When judging whether the code is clearer, keep in mind that your readers are not necessarily on your team, or familiar with your project, so types that you and your reviewer experience as unnecessary clutter will very often provide useful information to others. For example, you can assume that the return type of make_unique() is obvious, but the return type of MyWidgetFactory() probably isn't.
Signed-off-by: Dan Zhang <[email protected]>
|
@RyanTheOptimist can this be merged? |
Commit Message: Refactor QuicPersistentInfoImpl. Move out the fields that are not persistent across cluster, i.e. transport_socket_factory_ and client_conext_, and crypto_config_.
This is to prepare for changing QuicPersistentInfoImpl ownership to cluster in #19862.
Risk Level: low, refactoring only
Testing: existing tests pass
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
Part of #19861, #18715