* 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>
* Drop ABSL_RANDOM_HWAES_FLAGS compiler flags
Older CPUs that do not have SSE4.1 would crash with the Ruby native gem
due to an illegal instruction exception.
The Abseil random library isn't being used at the moment
(https://github.com/grpc/grpc/pull/26476), and there's no reason gRPC
needs to force SSE4.1 instructions on all platforms at the moment. There
are other hardware-specific issues that need to be ironed out for this
to work: https://github.com/grpc/grpc/pull/26479
When the `-msse4` compiler flag was enabled, the Abseil code started
using the `pinsrb` instruction:
```
$ elfx86exts abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.o
MODE64 (ret)
CMOV (cmovne)
SSE2 (movdqa)
SSE41 (pinsrb)
SSE1 (movaps)
CPU Generation: Penryn
```
Closes https://github.com/grpc/grpc/issues/27095
* Revert "Drop ABSL_RANDOM_HWAES_FLAGS compiler flags"
This reverts commit 3b7cc74d39.
* Drop -msse4 compiler flag
Older CPUs that do not have SSE4.1 would crash with the Ruby native gem
due to an illegal instruction exception.
The Abseil random library isn't being used at the moment
(https://github.com/grpc/grpc/pull/26476), and there's no reason gRPC
needs to force SSE4.1 instructions on all platforms at the moment. There
are other hardware-specific issues that need to be ironed out for this
to work: https://github.com/grpc/grpc/pull/26479
When the `-msse4` compiler flag was enabled, the Abseil code started
using the `pinsrb` instruction:
```
$ elfx86exts abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.o
MODE64 (ret)
CMOV (cmovne)
SSE2 (movdqa)
SSE41 (pinsrb)
SSE1 (movaps)
CPU Generation: Penryn
```
This was previously needed because gcc 4.8 wouldn't compile without the
`-msse4` and `-maes` flags.
However, per
97db2bf7fb
gcc 5.0+ automatically detects whether these options are enabled.
clang still needs `-maes` since including `wmmintrin.h` expects the AES
option to be enabled.
Closes https://github.com/grpc/grpc/issues/27095
* make error independent
* Separate grpc_error into its own library
This is forward work to move Closure, ExecCtx into their own libraries
in order to make use of them in the activity code for resource quota
wakeups.
* Automated change: Fix sanity tests
* fixes
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
* separate slice into internal and refcount, with refcount being the minimal base
* python3-ize
* Separate slices from mdelems for static data
Allows us to separate a small build target with just some slice basics
from the rest, which will help simplify the build system longer term.
Additionally exposed an opportunity to eliminate an init function.
Should also help in a month or so when it's time to jettison interned
metadata and slices entirely.
* fix compilation
* Automated change: Fix sanity tests
* fixes
* fixfixfix
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
* Implement type safety for TLS
This is mostly free when compiler support is available, but requires
careful templating when implemented using pthread.
Significantly slimmed the tls.h interface; it now only defines the "TLS
keyword" for each supported compiler, delegating enforcement of correct
usage (i.e. must be static) to the compiler itself.
Implemented implicit conversion for the pthread wrapper so it can be
used (mostly) the same as native support. Notable exception to this is
that static_cast<void*> is needed when printing a pointer stored in TLS
as %p.
* Use GPR_THREAD_LOCAL macros consistently
* Bump Envoy and related submodules to latest
* Update googleapis
* Update scripts for newer submodules
* Update udpa
* Add opentelemetry
* Python changes for opentelemetry
* Update udpa in check_submodules
* Add opentelemetry to check submodules
* Regenerate upb files
* Add new proto dependency to upb-gen and Bazel
* Regenerate project
This code adds an iomgr implementation that's backed by an EventEngine. This uses the EventEngine API alone, and separate work will introduce an EventEngine prototype to plug into it.
See also drfloob#1: @nicolasnoble has a pull request against this branch, implementing the libuv-based EventEngine. One goal here is to implement the iomgr code such that it can be merged independently without affecting normal builds.
This implementation can be built using bazel build --cxxopt='-DGRPC_USE_EVENT_ENGINE' :all
Some shortcuts are being taken to get a working, testable version of the engine. EventEngines are not pluggable, for example.
* Ring hash implementation
* Fixing an error caught during import:
ipv6 addresses need small modifications when creating the ring entry.
* fixing an error
* removing debugs
* Remove unnecssary hashing
* small cleanup