-
Notifications
You must be signed in to change notification settings - Fork 3.9k
add "resource_timer_is_transient_failure" server feature #12063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
add "resource_timer_is_transient_failure" server feature #12063
Conversation
for (ResourceWatcher<T> watcher : watchers.keySet()) { | ||
if (processingTracker != null) { | ||
processingTracker.startTask(); | ||
} | ||
watchers.get(watcher).execute(() -> { | ||
try { | ||
/*This will go after xdsClient watcher APIs are in. | ||
watcher.onResourceChanged(StatusOr.fromStatus(Status.UNAVAILABLE.withDescription( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just call onError()
. That's equivalent for the current API as there is no data yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a lot of new code has been merged since then. There are a lot of new failures in files like CdsLoadBalancer2Test, GrpcXdsClientImplTestBase, GrpcXdsClientImplV3Test, etc.
Same files and lines were also getting changed in xds client watcher API changes. Perhaps this should wait until xds client watcher api changes goes in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should there be any new failures? Sounds like you aren't setting resourceTimerIsTransientError
correctly to preserve the old behavior for the majority of the tests.
…r_feature_resource_timer
…r_feature_resource_timer
…ivaspeaks/grpc-java into server_feature_resource_timer
for (ResourceWatcher<T> watcher : watchers.keySet()) { | ||
if (processingTracker != null) { | ||
processingTracker.startTask(); | ||
} | ||
watchers.get(watcher).execute(() -> { | ||
try { | ||
watcher.onResourceDoesNotExist(resource); | ||
if (resourceTimerIsTransientError) { | ||
watcher.onError(Status.UNAVAILABLE.withDescription( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit test for watcher.onError and the timeoutSec value when resource timer is transient error.
No description provided.