Add quic_expect_bug_impl.h, (spdy|http2)_logging_impl.h, (spdy|http2)_bug_tracker_impl.h QUICHE platform implementation#6339
Conversation
Signed-off-by: Bin Wu <[email protected]>
Signed-off-by: Bin Wu <[email protected]>
Signed-off-by: Bin Wu <[email protected]>
Signed-off-by: Bin Wu <[email protected]>
|
/assign @danzh2010 |
|
/retest |
|
🔨 rebuilding |
bazel/external/quiche.BUILD
Outdated
| name = "http2_platform", | ||
| hdrs = [ | ||
| "quiche/http2/platform/api/http2_arraysize.h", | ||
| "quiche/http2/platform/api/http2_bug_tracker.h", |
There was a problem hiding this comment.
Q please: do these API files need to be wrapped in envoy_select_quiche if their impl's are wrapping with it?
There was a problem hiding this comment.
It's not necessary but I moved some to envoy_select_quiche.
IIUC, this (and some other) library is not a "real" library - it does not have a "srcs" section, so "bazel build" this library "succeeds" without doing anything. But
- if a dependency(like http2_platform_test) uses this library, that dependency will fail to build.
- the library will fail to build as soon as we add a .cc to the "srcs" section.
In my past PRs, I add envoy_select_quiche when 1) ci fails on the files I'm adding or 2) I think ci will fail on the files I'm adding. It is really a bandaid to allow us to continue working on platform impls before the root of the build problem is fixed.
|
|
||
| envoy_cc_library( | ||
| name = "quic_platform_logging_impl_lib", | ||
| srcs = ["quic_logging_impl.cc"], |
There was a problem hiding this comment.
does this need to be wrapped in envoy_select_quiche?
There was a problem hiding this comment.
It's not necessary, libraries depend on this is using envoy_select_quiche.
|
|
||
| if (!(is_dfatal && g_dfatal_exit_disabled)) { | ||
| abort(); | ||
| } |
There was a problem hiding this comment.
Can you combine this if block with the #ifdef NDEBUG block above?
| @@ -26,6 +30,14 @@ TEST(SpdyPlatformTest, SpdyArraysize) { | |||
| EXPECT_EQ(5, SPDY_ARRAYSIZE(array)); | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
Can we move these tests under namespace spdy? ditto to Http2PlatformTest
There was a problem hiding this comment.
Move their namespaces SGTM, but it is unrelated to this PR, let's do it separately.
Signed-off-by: Bin Wu <[email protected]>
danzh2010
left a comment
There was a problem hiding this comment.
LGTM other than a request to add corresponding namespace to spdy|http2_platform_test.cc
…ng_impl Signed-off-by: Bin Wu <[email protected]>
|
/assign @mattklein123 @alyssawilk @htuch |
alyssawilk
left a comment
There was a problem hiding this comment.
LGTM pending one question
| #define QUIC_BUG_IF_IMPL(condition) QUIC_LOG_IF(DFATAL, condition) | ||
| #define QUIC_PEER_BUG_IMPL QUIC_LOG(ERROR) | ||
| #define QUIC_PEER_BUG_IF_IMPL(condition) QUIC_LOG_IF(ERROR, condition) | ||
| #define QUIC_BUG_IMPL QUIC_LOG_IMPL(DFATAL) |
There was a problem hiding this comment.
preexisted, but doesn't QUIC_BUG work based on the exponential back-off, and could cause serious perf problems if we don't do that?
Should we get a TODO to get around to that work?
There was a problem hiding this comment.
QUIC_BUG has the exponential back off in google3 but not Chromium. It, like other error logs, could cause serious perf problems if it happens too frequently.
TODO added to implement exponential back off in envoy.
There was a problem hiding this comment.
yeah, per-packet logging server side scales less well than client side :-) thanks for the TODO
| SPDY_DLOG(INFO) << "DLOG(INFO)"; | ||
| SPDY_DLOG(ERROR) << "DLOG(ERROR)"; | ||
|
|
||
| SPDY_DLOG_IF(ERROR, true) << "DLOG_IF(ERROR, true)"; |
There was a problem hiding this comment.
Just as an FYI; when we do the Envoy-side QUIC implementation, we should avoid using any of these macros, ideally we restrict access to them using package visibility to just the QUICHE code and PAL.
Signed-off-by: Bin Wu <[email protected]>
wu-bin
left a comment
There was a problem hiding this comment.
Thanks Alyssa and Harvey. I added a TODO for the exponential back off.
| #define QUIC_BUG_IF_IMPL(condition) QUIC_LOG_IF(DFATAL, condition) | ||
| #define QUIC_PEER_BUG_IMPL QUIC_LOG(ERROR) | ||
| #define QUIC_PEER_BUG_IF_IMPL(condition) QUIC_LOG_IF(ERROR, condition) | ||
| #define QUIC_BUG_IMPL QUIC_LOG_IMPL(DFATAL) |
There was a problem hiding this comment.
QUIC_BUG has the exponential back off in google3 but not Chromium. It, like other error logs, could cause serious perf problems if it happens too frequently.
TODO added to implement exponential back off in envoy.
| SPDY_DLOG(INFO) << "DLOG(INFO)"; | ||
| SPDY_DLOG(ERROR) << "DLOG(ERROR)"; | ||
|
|
||
| SPDY_DLOG_IF(ERROR, true) << "DLOG_IF(ERROR, true)"; |
alyssawilk
left a comment
There was a problem hiding this comment.
LGTM - I'll let Harvey sign off on his requests and merge.
| #define QUIC_BUG_IF_IMPL(condition) QUIC_LOG_IF(DFATAL, condition) | ||
| #define QUIC_PEER_BUG_IMPL QUIC_LOG(ERROR) | ||
| #define QUIC_PEER_BUG_IF_IMPL(condition) QUIC_LOG_IF(ERROR, condition) | ||
| #define QUIC_BUG_IMPL QUIC_LOG_IMPL(DFATAL) |
There was a problem hiding this comment.
yeah, per-packet logging server side scales less well than client side :-) thanks for the TODO
Description:
Add quic_expect_bug_impl.h, (spdy|http2)_logging_impl.h, (spdy|http2)_bug_tracker_impl.h QUICHE platform implementation.
All of them depends on quic_logging_impl.h.
Risk Level: minimum, code not used yet.
Testing:
bazel test test/extensions/quic_listeners/quiche/platform:spdy_platform_test --test_output=all --define quiche=enabled
bazel test test/extensions/quic_listeners/quiche/platform:http2_platform_test --test_output=all --define quiche=enabled
bazel test test/extensions/quic_listeners/quiche/platform:quic_platform_test --test_output=all --define quiche=enabled
bazel test @com_googlesource_quiche//:spdy_platform_test --test_output=all --define quiche=enabled
bazel test @com_googlesource_quiche//:http2_platform_test --test_output=all --define quiche=enabled
bazel test @com_googlesource_quiche//:quic_platform_test --test_output=all --define quiche=enabled
Docs Changes: none
Release Notes: none
[Optional Fixes #Issue]
[Optional Deprecated:]