* Fix OOM issues in qps tests
* Add more verbose logging.
* Fix clang error
* Fix race between IsCancelled and Read
* Fix build errors from using bool in C code
* Ensure that per route retry policy (even when there are no supported
retry_on statuses) still takes precedence over virtual host level retry
policy.
Added a test to guard this case.
* Taking care of code review comments and removing unnecessary block
* xDS Security: Use new way to fetch certificate provider plugin instance
config
* Reviewer comments
* Additional fields to NACK
* Move NACKing tests for tls_certificates and tls_certificate_sds_securet_configs to client-side
* fix retry code to fail batches instead of creating attempt if previously cancelled from surface
* add xDS end2end tests covering the FI use-case that triggered the bug
* fix memory leak
If we continue to call `Write()` after `WriteLast()` (because client is still sending us data and thus `Read()` returns `true`), the buffer might become invalid and results in assertion failures.
This temporarily unblocks a related gtest upgrade. The ultimate goal is
to upgraade our gtest dependencies, but I don't have the cycles to
manage a potentially messy migration until at least next week. This PR
is coordinated with an internal change.
See code commentary for an explanation.
Add an additional constructor to allow `log_linux.cc` to compile with
GPR_PTHREAD_TLS. Without it:
```
../../third_party/grpc/src/core/lib/gpr/log_linux.cc:78:33: error: no viable conversion from 'int' to 'grpc_core::PthreadTlsImpl<long>'
static GPR_THREAD_LOCAL(long) tid = 0;
^ ~
../../third_party/grpc/src/core/lib/gpr/tls.h:64:3: note: candidate constructor not viable: no known conversion from 'int' to 'const grpc_core::PthreadTlsImpl<long> &' for 1st argument
PthreadTlsImpl(const PthreadTlsImpl&) = delete;
^
1 error generated.
```
* 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
This exposes a bug in clang, reported upstream as
https://bugs.llvm.org/show_bug.cgi?id=51368.
The clang bug is mitigated using a fake scoped lock; that allows the
current code to compile while also serving as a change detector to
prevent it from going stale; if the compiler bug is fixed, the compiler
will see an overlapping locking requirement, and reject this code, which
will prompt a human being to remove this workaround.
It is not possible for such a function to be implemented in a way that
is understood by annotalysis. Mark it deprecated and replace instances
of its use with direct mutex/condvar usage.
Add a bunch of missing thread safety annotations while I'm here.
* LB policy API improvements
* clang-format
* fix build
* a bit more cleanup
* use absl::variant<> for pick result
* fix retry_lb_drop test
* clang-format
* fix grpclb_end2end_test
* fix xds_end2end_test
* try to make variant code a bit cleaner
* clang-format
* fix memory leak
* fix build
* clang-format
* fix error refcount bug
* remove PickResult factory functions
* clang-format
* add ctors to structs
* clang-format
* fix clang-tidy
* update comments
* move LB recv_trailing_metadata callback instead of copying it
* use Match() instead of providing PickResult::Handle()
* don't use Match() for now, since it breaks lock annotations
* update retry_lb_fail test