Repository navigation
Make HotRestart reference available to ActiveQuicListeners - #29306
ravenblackx wants to merge 12 commits into
Conversation
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
|
Assigning to @jmarantz for first pass due to familiarity with the purpose of this change. |
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
| srcs = ["quic_stat_names.cc"], | ||
| hdrs = ["quic_stat_names.h"], | ||
| hdrs = [ | ||
| "quic_context.h", |
There was a problem hiding this comment.
nit: I think it would be a little nicer to separate quic_context_lib but that would probably add a few BUILD files to the PR. I'm fine with checking this in and iterating, or you can go ahead and do it now; up to you. WDYT for now of at least adding a comment with a TODO?
|
I think Dan &/or Ryan needs to take a look also. |
RyanTheOptimist
left a comment
There was a problem hiding this comment.
Nice! This looks great.
| srcs = ["quic_stat_names.cc"], | ||
| hdrs = ["quic_stat_names.h"], | ||
| hdrs = [ | ||
| "quic_context.h", |
| } // namespace Server | ||
| namespace Quic { | ||
|
|
||
| class QuicContext { |
There was a problem hiding this comment.
nit: Brief comment.
| http_context_(stats_store_.symbolTable()), router_context_(stats_store_.symbolTable()), | ||
| time_system_(time_system), server_contexts_(*this), | ||
| quic_stat_names_(stats_store_.symbolTable()) { | ||
| quic_context_(stats_store_.symbolTable(), absl::nullopt) { |
There was a problem hiding this comment.
I'm slightly surprised that this is a nullopt here. Does this maybe deserve a comment explaining why? I have a couple of hypothesis, but I'm not sure if they're valid :)
There was a problem hiding this comment.
I can explain why -- the validation-server does not have a hot-restart object. You could arguably instantiate a no-op hot-restarter like we do in server/server.cc if we disable hot-restart, but this seems OK as long as we always check the optional value before dereferencig it.
There was a problem hiding this comment.
I can explain why -- the validation-server does not have a hot-restart object.
Ah! That makes sense.
You could arguably instantiate a no-op hot-restarter like we do in server/server.cc if we disable hot-restart, but this seems OK as long as we always check the optional value before dereferencig it.
nod that makes sense. Though if we do have a no-op restarter, I would probably be inclined to use it here so we can avoid the need to do the checks elsewhere. But this current approach is also just fine.
There was a problem hiding this comment.
I went with OptRef rather than the no-op object because getting the no-op one into all the various test contexts where the object is referenced would be way more of a pain than the one-line "is it set" check at the single usage site. I agree with the design preference of using the no-op object, but from a practical perspective doing it that way is a lot. (And the usage site isn't in any main flow so it's not performance-critical enough to warrant that effort.)
|
/wait |
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
|
Now it looks like this might not be necessary after all, as progress happens on its dependent... |
|
Not following you -- are you going to close this PR and re-open if needed then? |
|
Ah, good point, I forgot re-open was even an option. Yes, I'm now about 90% confident that this is not necessary, so closing it, at least for now, hopefully forever. 😁 |
Commit Message: Make HotRestart reference available to ActiveQuicListeners
Additional Description: This is a prerequisite for quic hot restart support; listeners must be registered with the hot restart class so that it can find where to send forwarded packets. Adding the hot restart reference to the factory as a new field causes per-cluster memory tests to fail, so it has to be rolled in with an existing reference to avoid that (the alternative would be piping it through as a new parameter through a much longer chain of function calls, which has a relatively large blast-radius and logically makes less sense than delivering it via a factory.)
Risk Level: None - when it builds it's effectively a no-op for now.
Testing: Existing coverage. The hotRestart() getter is not tested until a subsequent change in which it is used.
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a