Also updated CensusModule to use the new helper methods ContextUtils.withValue() instead of directly manipulating the context keys. See census-instrumentation/opencensus-java#1864.
This reverts commit ac52e27b2a.
See #5665. Right now it is not any more informative than the header
example, and it encourages some practices I'd rather avoid. It will get
re-added later with improvements.
It is just causing trouble. When using paddedCell() it doesn't reliably
complain about failures and without paddedCell() it won't finish its
check. And when it does complain you have to guess what it wants from
you because unrelated changes are complained about at the same time.
It also caused trouble because **/*.gradle is overly aggressive; it
searchs build/ folders and bazel folders. But when trying to swap it to
per-project checks on the build.gradle I was unable to get it to fail,
even with obvious problems like using tabs.
* Revert "xds/third_party: fixed compatibility issue of regex in BSD for import.sh sed command (#5613)"
This reverts commit affce636dd.
* added comment to avoid manual change as the script is synced with internal upstream
Having two Helpers (the other being LoadBalancer.Helper) is proven to
be confusing, and the one in NameResolver is fundamentally different
from the one from LoadBalancer, as the latter mutates the states while
the former doesn't. Renaming it to Args make it less awkward to
expose it to LoadBalancer, which is needed for creating NameResolvers
for per-locality routing in the XdsLoadBalancer.
As we are now endorsing the wrapping of ClientStreamTracers by
providing ForwardingClientStreamTracer, there is a need for altering
StreamInfo, especially CallOptions before it's passed onto the
delegate. A Builder class and a toBuilder() provides a robust way
to copy the rest of the fields.
This is a breaking change for anybody who creates StreamInfo, which is
unlikely in non-test code, because StreamInfo was added as late as
1.20.0.
* api: fix bugs of missing out customOptions in CreateSubchannelArgs toBuider, hashCode, equals
* trash equals/hashCode for CreateSubchannelArgs as they are problematic
This reverts commit 6d44f46f18.
This is causing a test to hang internally. I am currently expecting that
the shutdown logic of the test is broken, but it will take time to
diagnose. Thus, revert this for the moment.
* Implement LRS client with backoff. No load data is invovled yet, only for load reporting interval updates. Unit test with load report interval update and streamClosed retry.
* use a separate stopwatch to manage actual load report interval
* refactor XdsLrsClientTest
* LRS response will only receive exactly one cluster name for grpc use case
* add more XdsLrsClientTest
* change class modifier
* fixed class comment
* renamed TRAFFICDIRECTOR_HOSTNAME_FIELD
* removed self-implemented Duration util methods, instead use methods in com.google.protobuf.util.Durations
* starting LrsStream's stopwatch inside LrsStream's start method
* fixed bug of using the wrong stopwatch for XdsLrsClient retrying
* removed try-catch around request StreamObserver
* polished code by eliminating unnecessary operations
* log an error instead of crash the thread when receiving LRS response for different cluster name
* created a XdsLoadStatsManager interface, XdsLrsClient implements it
* added XdsLoadStatsStore component in XdsLrsClient
* specify thread safety in XdsLoadStatsManager
* fixed style and convention issues
* added test case for verifying recorded load data by manually crafting load data
* added thread-safety in interface specification
* minor polish with adding debug logs to LRS client
This removes the "java_import to work around error with android_binary"
hack; see the b/78647825 references to see the really important parts.
But in general using a toolchain cleans up the code considerably and
allows us to reduce the visibility of our protoc plugin. It also is
useful to enable using aspects in the future to avoid using
make_non_strict() which would improve compilation speed avoid avoid many
unnecessary rebuilds.
This is an export of cl/229763103 and brings external up-to-sync with
internal.
Interceptors need to see the onClose to clean up properly.
This also changes an isInterrupted() to interrupted(), since previously
the interrupted flag was still set when InterruptedException was thrown.
This caused an infinite loop with the new code. Previously, all callers
immediately re-set the interrupted flag, so there was no issue.
Fixes#5576
NameResolverRegistry takes on all the logic previously in
NameResolverProvider. But it also allows manual registration of
NameResolvers, which is useful when the providers have complex
construction or need objects injected into them.
This also avoids a circular dependency during class loading since
previously loading any Provider searched for all Providers via
ClassLoader since ClassLoader handling was static within the parent
class.
Fixes#5562
* Implemented XdsCliendLoadRecorder which is a ClientStreamTracer.Factory that takes a counter and produces ClientStreamTracer aggregating the counter in callback.
* WIP: add tests for XdsLoadReportStore
* fix query count logic, use an atomic in-progress call counter instead of callsStarted with manual computation at snapshot
* make XdsLoadReportStore threadsafe
* fix class and field modifiers
* make iterating concurrentMap threadsafe
* fixed forgetting to call delegated streamClosed
* add a method to discard ClientLoadCounter for a given locality
* add test to guard interceptPickResult does not destroy original ClientStreamTracer
* added cluster wide dropCounters and method to be called to record dropped requests, tests to be added later.
* add methods for add/discard ClientLoadCounters for localities manually instead of implicitly added by interceptPickResult call. Unit tested.
* make a static noop ClientStreamTracer and ClientStreamTracer.Factory instead of creating one each every time need it
* refractor interceptPickResult
* modified ClientLoadCounter to allow continuing recording loads for localities no longer exposed by balancer while having ongoing loads
* refractor tests
* reworded method comment for calling in syncContext
* fixed issue of no setting dropCount to 0 after load reporting
* polish test
* added test coverage for recording dropped requests (not concurrent)
* added class comment for XdsClientLoadRecorder
The ALTS builders are supposed to act like ChannelCreds, as done in
other languages. ChannelCreds don't have the opportunity to change
settings like this. In addition, the options here weren't set in
GoogleDefaultChannelBuilder and ComputeEngineChannelBuilder.