* sketch
* Eliminate post-init in channel stack builder
We've had a post init function on channel stack builder for a very long
time, an it serves to run some code after initialization completes.
We need the functionality for a few things, but the function passed in
is intimately tied to the filter in use - we never vary it between
multiple functions for the same filter... which means it makes more
sense to locate this functionality as part of the filter interface.
* fix
* Automated change: Fix sanity tests
* introduce-channel-stack
* introduce-channel-stack
* Automated change: Fix sanity tests
* fix
* fix
* fix
* fixes
* Fix
* fix
* fix
* Automated change: Fix sanity tests
* Automated change: Fix sanity tests
* review feedback
* fix
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
* Revert "Revert "health check service: rewrite using callback API (#29457)" (#29559)"
This reverts commit d4680eb8eb.
* don't register callback generic service if there is an async generic service
* fix edge case in shutdown
* don't call Finish() more than once
* add log message to help debugging
* don't start a new write after calling Finish()
In the SubchannelStreamClient constructor, do not initialize an
absl::string_view with a null pointer; this leads to strlen() being
called on the null pointer. Let the absl::string_view be initialized
with the string literal "SubchannelStreamClient" in this case instead.
Fixes#29567.
* Move unnecessary absl includes from metadata_batch.h
metadata_batch.h is a widely used header, and so any includes it takes
that are for its internal use can negatively impact our build times.
* missing file
* build
* review feedback
* Eliminate post-init in channel stack builder
We've had a post init function on channel stack builder for a very long
time, an it serves to run some code after initialization completes.
We need the functionality for a few things, but the function passed in
is intimately tied to the filter in use - we never vary it between
multiple functions for the same filter... which means it makes more
sense to locate this functionality as part of the filter interface.
* fix
* Automated change: Fix sanity tests
* fix
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
When single closure is scheduled multiple times before it is run, it
runs less times than the number of times it is scheduled.
As a result, when server receives multiple RPC calls in a very short
time frame, `accept_stream_locked` is not correctly called for every
RPC call received.
We are working on internal server side stress test to make sure this
kind of error won't happen again.
This commit also uses atomic int for issuing new stream id. Without this
there is 10% probability of stream id collision when 128 parallel RPC
calls are initiated at the same time.
Currently the tcp connect is performed in chttp2_connector before the handshaking is triggered. For
use cases where the application wants to perform business logic before
the tcp connection, this is problematic. By moving the TCP connect into
its own handshaker and registering it by default at the beginning, this
allows applications to add a new handshaker at the beginning allowing
handshaker logic before a TCP connect.
This approach has the advantage of slightly simplifying the logic in
tcp_connect_handshaker and httpcli as tcp_connect/callback can be
removed.
As the TCP connect needs parameters like resolved_addr,
interested_parties, a new struct called connection args is created as a
member for Handshaker Args.
For server handshakers most of the arguments here are not directly
useful, other than the deadline.
This file gets included by resolver, which gets included by
core_configuration, which in turn sprays this inclusion everywhere (and
it's a costly file to parse)
* adding a min progress size argument to grpc_endpoint_read
* fix missing argument error
* adding a static_cast
* reverting changes in tcp_posix.cc
* add missing changes to CFStreamEndpointTests.mm
* Restructure HPackParserTable to not use an inline table, and use a std::vector for its ring buffer instead.
Before this change, it uses 6.2KiB by default, 2/3 of the size of grpc_chttp2_transport. https://screenshot.googleplex.com/6qdcybty2oCsGjG
After this change, it uses 120 bytes https://screenshot.googleplex.com/4xGWKmZZz68VE4F
This class uses up substantial amounts of memory, as it is allocated on a per-stream basis. This should reduce the size of grpc_chttp2_stream substantially
It should cause a significant memory reduction, as the HPack extension table should almost never be fully populated in terms of number of entries, especially since common headers already exist in a static table and entries are highly likely to take more memory than the absolute minimum.
* formatting
* delete unused method
* move MememtoRingBuffer
* reformat
* subchannel: report IDLE upon existing connection failure and after backoff interval
* rename AttemptToConnect() to RequestConnection()
* clang-format
* fix unused parameter warning
* fix subchannel to handle either TF or SHUTDOWN from transport
* fix handling of ConnectedSubchannel failure
* pass status up in IDLE state to communicate keepalive info
* update comment
* split pick_first and round_robin tests into their own test suites
* improve log message
* add test
* clang-format
* appease clang-tidy
* fix test to do a poor man's graceful shutdown to avoid spurious RPC failures
* simplify round_robin logic and fix test flakes
* fix grpclb bug