* 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
These targets are currently not layering check clean. Disabling it
ensures that they will continue to build even when we enable layering
check for Objective-C internally.
grpc_sockaddr_to_uri() does not support binder transport URI scheme
(which uses an invalid sa_family (AF_MAX) to avoid misuse) at
this moment. Fallback to a string represent unknown address type here.
* Add DNS Server address override to the EventEngine API
* instead, override authority in GetDNSResolver; other fixes
* feedback
* constrain dns_server format to "IP:port"
* Modifying slice buffer add to merge two contiguous slices sharing the same refcount object
* sanity checks
* updating test
* fixing grpc_slice_buffer_add API misuse in proto utils
* fix sanity checks
* minor fix
* unify DOCKER_TTY_ARGS in docker scripts
* improvements and cleanup in build_and_run_docker.sh
* fix shellcheck
* make sure python sdist artifact is readable
* Remove var type annotations in extract_metadata_from_bazel_xml
* Use plain-old Python class to store data
* No more f-string
* Remove version check in generate_projects.py
* Fixing RouteGuide's C++ Reactor example.
The current method involves locking and unlocking a mutex from different
threads, which isn't allowed. Changing the strategy a bit to address
this.
* Automated change: Fix sanity tests
* Switching to absl::Mutex to annotate usage properly.
* Actually, let's not cover the examples with sanity checks.