Eliminate slice interning, and structures in slices to support it.
Reduces grpc_slice_refcount from 40 bytes (+ a required 8 bytes elsewhere) to 16 bytes.
Removes a pointer dereference for every slice ref/unref.
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
This patch introduces a factory to allow supporting custom xDS channel
creds. Three types currently supported (fake, insecure, google_default)
are registered by default for backward-compatibility.
* WIP
* introduce XdsResourceType API and change Listener parsing to use it
* converted RouteConfig parsing
* convert cluster and endpoint parsing
* cleanup
* clang-format
* attempt to work around compiler problems
* move XdsResourceType to its own file, and move endpoint code out of XdsApi
* move cluster parsing to its own file
* move route config parsing to its own file
* move listener parsing to its own file
* clang-format
* minor cleanup
* plumbed XdsResourceType throughout XdsClient
* a bit of cleanup
* more cleanup
* construct full resource names before calling XdsApi::CreateAdsRequest()
* remove some unneeded code
* clean up includes and have XdsResourceType initialize the upb symtab
* more cleanup of unnecessary code
* more cleanup
* update comment
* clang-format
* add missing virtual dtor
* fix build
* remove comment
* add missing virtual dtor
* introduce XdsResourceType API and change Listener parsing to use it
* converted RouteConfig parsing
* convert cluster and endpoint parsing
* cleanup
* clang-format
* attempt to work around compiler problems
* move XdsResourceType to its own file, and move endpoint code out of XdsApi
* move cluster parsing to its own file
* move route config parsing to its own file
* move listener parsing to its own file
* clang-format
* minor cleanup
* remove comment
* add missing virtual dtor
* Fix status code for resource exhaustion
* Revert "Revert "Move a bunch of slice typed metadata to new system (#28107)" (#28208)"
This reverts commit 7717587063.
* fix test
* Revert "Revert "user-agent metadata trait, also: grpc_core::Slice is born (#27770)" (#28108)"
This reverts commit 89d08dad9d.
* will it blend
* will it blend
* will it blend
* lcnagfmt
* sanity
* will it blend
* sleep @ end
* will it blend
* Revert "sleep @ end"
This reverts commit d6bca8ed3d.
* review feedback
* review feedback
* Check if memory owner available prior to polling it
The transport may drop the memory owner during its destruction sequence
* tcp_fix
* Revert "Revert "New resource quota integration (#27643)" (#28014)"
This reverts commit 0ea2c37263.
* clang-format
* fix-path
* fix
* Rename the source files for ChannelArgsEndpointConfig
Previous naming was non-descript
* generate_projects
* add missing file to BUILD, and generate_projects.sh
* correct include guards
* Reintroduce the EventEngine default factory
An application can provide an EventEngine factory function that allows
gRPC internals to create EventEngines as needed. This factory would be
used when no EventEngine is provided for some given channel or server,
and where an EventEngine otherwise could not be provided by the
application. Note that there currently is no API to provide an
EventEngine per channel or per server.
I've also deleted some previous iterations on global EventEngine and
EventEngine factory ideas. This new code lives in a public API, and
coexists with iomgr instead of being isolated to an EventEngine-specific
iomgr implementation.
* add proper namespaces, and fix description
* put factory functions in their own file (for replaceability)
* add synchronization
* generate_projects.sh
* extract event_engine_base and event_engine_factory targets
Also separate iomgr/event_engine files in the BUILD, with comments
* gpr_platform
* move all EE factory declarations to event_engine_base
Makes internal hackery easier.
* add missing deps
* reorder dep alphabetically
* comment style change
* [BinderTransport] Avoid depending on NdkBinder at compile time
We would like to make it possible to use BinderTransport in a APK that
has min sdk version lower than 29 (NdkBinder was introduced at 29)
We copies constants and type definitions from Ndk headers, creates a
same name wrapper for every NdkBinder API we use in
grpc_binder::ndk_util namespace.
We will try to load libbinder_ndk.so and resolve the symbol when the
NdkBinder API wrappers are invoked.
* regenerate projects
* Add GRPC_NO_BINDER guard
A config option is provided so user can pass --define=grpc_no_binder=true to bazel, or passing `-DGRPC_NO_BINDER` to compiler to disable the dependency.
* Upgrade benchmark to 1.6.0 and remove hacks.
Details:
- GRPC currently uses an old version of benchmark (from Sept 2020). It should probably upgrade because downstream, in google3, everyone is already using 1.6.0)
- Removed the hack added in PR/27629 to allow benchmarks in GRPC to continue to work with both pre-1.6.0 and 1.6.0 benchmarks.
(This was needed to allow importing benchmarks 1.6.0 into google3 without breaking GRPC)
* fix typo
* update third_party/benchmark and check_submodules.sh
* Upmerge from v1.41.x (#27821)
* Bump version to v1.41.0-pre1 (#27371)
* Bump version to v1.41.0-pre1
* Regenerate projects
* [Backport #27373] add testing_version flag (#27385)
* Bump version to v1.41.0-pre2 (#27390)
* Bump version to v1.41.0-pre2
* Regenerate projects
* Core 19: bump core version from 18.0.0 to 19.0.0 (#27394)
* Bump core version to 19.0.0
* Regenerate projects
* fix use-after-free metadata corruption in C# when receiving response headers for streaming response calls (#27398)
* Final release: bump up version to 1.41.0 (#27476)
* Bump version to 1.41.0
* Regenerate projects
* xds_k8s_test: increase timeout to 3 hours due to recent timeout failure (#27580)
* Revert "xds_k8s_test: increase timeout to 3 hours due to recent timeout failure (#27580)" (#27590)
This reverts commit da0c7d680f.
* Update root pem certs (backport of #27539) (#27619)
* Update boringssl to the latest (#27606) (#27625)
* Change boringssl branch name
* update submodule boringssl-with-bazel with origin/main-with-bazel
* update boringssl dependency to main-with-bazel commit SHA
* regenerate files
* Increment podspec version
* generate boringssl prefix headers
* Bumping up version to v1.41.1 (#27699)
* Bump version to v1.41.1
* Regenerate projects
* [Backport][v1.41.x] xds-k8s tests: Use test driver from master branch (#27695)
Backports sourcing the test driver install script from master.
This is a backport of #27389, #27462 and #27658:
* Add missing quatation marks.
These were missed when creating the Python virtual env.
* xds-k8s tests: Use test driver from master branch (#27462)
Instead of directly sourcing the test driver provisioning script from the same branch, the script is downloaded (with curl) and sourced from the master branch.
This allows changes made to the test driver to be reflected in all future release branches. A separate PR will backport this change to existing release branches.
All cluster definitions are also moved to the install script, allowing any cluster changes to be done in one place in the master branch.
* xds_k8s tests: Fix xlang install script sourcing. (#27658)
This change sources the test driver install script correctly for the xlang tests.
This fixes a mistake in #27462 where this was missed.
* Fix Python Interop (#27620) (#27703)
* WIP. Attempt to fix interop
* Yapf
* Switch Python xDS Example Server to Listen on IPV4 Only (#27679)
* Switch to IPV4
* Update to all hosts
* Fix rvm ruby install failure (#27769)
Co-authored-by: donnadionne <donnadionne@google.com>
Co-authored-by: Lidi Zheng <lidiz@google.com>
Co-authored-by: Jan Tattermusch <jtattermusch@users.noreply.github.com>
Co-authored-by: sanjaypujare <sanjaypujare@users.noreply.github.com>
Co-authored-by: Sergii Tkachenko <sergiitk@google.com>
Co-authored-by: Esun Kim <veblush@google.com>
Co-authored-by: Terry Wilson <terrymwilson@gmail.com>
Co-authored-by: Richard Belleville <rbellevi@google.com>
* added perf_counters.cc manually since the script didn't work
Co-authored-by: Mark D. Roth <roth@google.com>
Co-authored-by: donnadionne <donnadionne@google.com>
Co-authored-by: Lidi Zheng <lidiz@google.com>
Co-authored-by: Jan Tattermusch <jtattermusch@users.noreply.github.com>
Co-authored-by: sanjaypujare <sanjaypujare@users.noreply.github.com>
Co-authored-by: Sergii Tkachenko <sergiitk@google.com>
Co-authored-by: Esun Kim <veblush@google.com>
Co-authored-by: Terry Wilson <terrymwilson@gmail.com>
Co-authored-by: Richard Belleville <rbellevi@google.com>
* ChannelStackModifier class
* Regenerate projects
* clang-tidy
* Use CoreConfiguration for inserting xDS HTTP filters
* New lines
* Move test to test/core/xds
* Add comment for placement of filter stack
* Fix sanity
* Fix memory leak - destroy builder
* Don't build xds_channel_stack_modifier_test on non-bazel build systems due to census dependency
This commit is part of the effort to create binder channel with
GRPC_CLIENT_CHANNEL type.
The resolver will be used during name resolution, and the result will
later be used to identify the corresponding endpoint binder in
SubchannelConnector.
Besides the unit test, this change is tested with other changes locally
end to end on real device.
* RLS LB policy plugin implementation
* Add RLS tests
* rls proto
* generate projects
* Fix adding child policy to child policy map
* Fix issues
* Fix rotten bits
* generate projects
* revert some strange changes
* First batch of fixes
* second batch of addressing comments
* generate_projects
* 3rd batch of fixes
* generate_projects
* 4th batch of fix
* 5th batch of fix
* Empty commit to trigger github PR refresh
* Add insecure build
* generate project
* update picker in a closure
* mutex guard audit
* clang-format
* Aggregate child policy states
* Use OrphanablePtr on ChildPolicyOwner()
* More fixes on comments
* Remove include grpc_security from rls.cc
* Fix key builder test as we removed RlsFindPathFromMetadata
* Update rls proto and add multi-target capability
* code changes to fix build after merging master
* remove support for insecure builds
* WIP
* add LB policy metadata lookup API
* add API for creating errors from C++ strings
* add missing include
* finished updating JSON parsing
* use DualRefCounted<> for ChildPolicyWrapper
* use grpc_core::Mutex instead of std::recursive_mutex
* add lock annotations and fix some lifetime issues
* misc fixes and cleanups
* simplify child policy connectivity state machine
* add comment about hopping into ExecCtx
* don't use wait_for_ready for RLS call
* extraKeys and constantKeys support
* add lock annotations for child policy wrapper connectivity state
* improve logging
* simplify child policy state handling in picker
* use C++ style comments
* remove rls_config.proto, since it's not needed
* rewrote tests
* fix build
* fix copyright headers
* clang-format
* appease clang-tidy
* remove unnecessary dependendency on grpclb
* buildifier
* remove illegal term
* remove unneeded includes
* clang-format
* fix clang-tidy
* fix build
* move class declaration into .cc file
* clang-tidy again
* fix build
* reorganize code and misc cleanups
* clang-format
* fixed a bunch of asan bugs; still some left to debug
* fix asan problem
* make test work on IPv6-only machines
* move LRU list handling into Cache::Entry and add lock annotations
* use preincrement instead of postincrement
* fix deadlock
* add more FIXMEs
* clean up backoff timer logic
* fix build from merge
* clang-format
* fix include path to work on podspec builds
* clean up picker logic
* clang-format
* update rls.proto
* populate reason and stale_header_data in RLS request
* improve logging and fix some cache size type issues
* clang-format
* add some TODOs about a better way to expose channel creds to LB policies
* centralize handling of channel's default authority
* clang-format
* fix backup poller bug
* fix handling of call creds and authority on RLS channel
* remove unused params
* clang-format
* use two-phase update for child policies to avoid deadlocks
* fix portability issue
* minor cleanups
* update for change in grpc_error_get_status() API
* change test to store RLS requests and responses in proto form
* clang-format
* account for test slowdown factor in timeouts
* fix tsan failure and channelz linkage
* fix RLS authority death test
* fix test to not try to connect to target that should not work
* remove illegal term
* cacheSizeBytes is a required field
* add missing BUILD deps from merge
* add tests for connectivity state reporting and fix bugs found
* fix BUILD sanity
* buildifier
* fix BUILD package path
* fix bugs related to child policy lifetime and updates
* remove unnecessary srand() call from grpc_init()
* add test for two cache entries with the same target
* update rls.proto
* change RLS config parser test to support GRPC_ERROR_IS_ABSEIL_STATUS
* update upb codegen
* fix include path
* add env var guard
* avoid duplication of CountedService
* generate_projects
* add upper limit for cacheSizeBytes
* fix build
Co-authored-by: Muxi Yan <mxyan@google.com>