-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Motivation: When the new retrying http filter is applied under some particular conditions, the retry logic yields infinite attempts. Modifications: - When the filter is appended conditionally, capture the instance to lazy inject LB/SD state. - Change the default max-total-retries to guard better LB/SD error flow. - Additional input validation for durations. Result: Safe retry behavior.
- Loading branch information
Showing
6 changed files
with
226 additions
and
47 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...i/src/main/java/io/servicetalk/http/api/ContextAwareStreamingHttpClientFilterFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright © 2022 Apple Inc. and the ServiceTalk project authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.servicetalk.http.api; | ||
|
||
import io.servicetalk.concurrent.api.Completable; | ||
import io.servicetalk.concurrent.api.Publisher; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* API introduced to help transition 0.41 core to 0.42. | ||
* @deprecated DO NOT USE. | ||
*/ | ||
@FunctionalInterface | ||
@Deprecated | ||
public interface ContextAwareStreamingHttpClientFilterFactory | ||
extends StreamingHttpClientFilterFactory { | ||
StreamingHttpClientFilter create(FilterableStreamingHttpClient client, | ||
@Nullable Publisher<Object> lbEventStream, | ||
@Nullable Completable sdStatus); | ||
|
||
@Override | ||
default StreamingHttpClientFilter create(FilterableStreamingHttpClient client) { | ||
return create(client, null, null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.