-
Notifications
You must be signed in to change notification settings - Fork 183
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
Remove special defaultStrategy()
merge method
#2108
Merged
Merged
Conversation
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
Motivation: The `HttpExecutionStrategies.defaultStrategy()` strategy currently provides a special `merge()` implementation that, rather than merge, simply returns the other strategy. This behavior is often surprising and requires specific handling elsewhere to ensure that the strategy has consistent merging when referenced reflexively. Modifications: Replace use of `HttpExecutionStrategies.defaultStrategy().merge()` with explicit substitution of `defaultStrategy()` with the appropriate strategy. Result: Reduced special behavior in the `HttpExecutionStrategy` implementation which clarifies the actual interaction and behavior of strategies.
bondolo
commented
Feb 26, 2022
servicetalk-grpc-api/src/main/java/io/servicetalk/grpc/api/GrpcExecutionStrategies.java
Show resolved
Hide resolved
servicetalk-grpc-netty/src/test/java/io/servicetalk/grpc/netty/ErrorHandlingTest.java
Show resolved
Hide resolved
servicetalk-http-api/src/main/java/io/servicetalk/http/api/HttpExecutionStrategyInfluencer.java
Outdated
Show resolved
Hide resolved
servicetalk-http-api/src/main/java/io/servicetalk/http/api/SpecialHttpExecutionStrategy.java
Outdated
Show resolved
Hide resolved
servicetalk-http-utils/src/main/java/io/servicetalk/http/utils/TimeoutFromRequest.java
Show resolved
Hide resolved
...http-netty/src/main/java/io/servicetalk/http/netty/ClientStrategyInfluencerChainBuilder.java
Outdated
Show resolved
Hide resolved
...http-netty/src/main/java/io/servicetalk/http/netty/ClientStrategyInfluencerChainBuilder.java
Outdated
Show resolved
Hide resolved
servicetalk-http-netty/src/test/java/io/servicetalk/http/netty/ClientEffectiveStrategyTest.java
Show resolved
Hide resolved
servicetalk-http-api/src/main/java/io/servicetalk/http/api/HttpExecutionStrategyInfluencer.java
Outdated
Show resolved
Hide resolved
idelpivnitskiy
approved these changes
Mar 4, 2022
...http-netty/src/main/java/io/servicetalk/http/netty/ClientStrategyInfluencerChainBuilder.java
Outdated
Show resolved
Hide resolved
bondolo
added a commit
to bondolo/servicetalk
that referenced
this pull request
Apr 15, 2022
Motivation: The changes in apple#2108 introduced a regression in the handling of computation of the effective strategy of a client when a strategy `offloadNone()` (or the deprecated `offloadNever()`) was used with the `HttpClientBuilder`. Rather than preventing all offloading, the computed offloading was used. Modifications: If the strategy specified on the `HttpClientBuilder` does not specify any offloads then no offloading will be used. Result: The offloading behavior matches the requested behavior specified on the `HttpClientBuilder`.
bondolo
added a commit
to bondolo/servicetalk
that referenced
this pull request
Jun 7, 2022
Motivation: The changes in apple#2108 introduced a regression in the handling of computation of the effective strategy of a client when a strategy `offloadNone()` (or the deprecated `offloadNever()`) was used with the `HttpClientBuilder`. Rather than preventing all offloading, the computed offloading was used. Modifications: If the strategy specified on the `HttpClientBuilder` does not specify any offloads then no offloading will be used. Result: The offloading behavior matches the requested behavior specified on the `HttpClientBuilder`.
idelpivnitskiy
pushed a commit
that referenced
this pull request
Jun 8, 2022
Motivation: The changes in #2108 introduced a regression in the handling of computation of the effective strategy of a client when a strategy `offloadNone()` (or the deprecated `offloadNever()`) was used with the `HttpClientBuilder`. Rather than preventing all offloading, the computed offloading was used. Modifications: If the strategy specified on the `HttpClientBuilder` does not specify any offloads then no offloading will be used. Result: The offloading behavior matches the requested behavior specified on the `HttpClientBuilder`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
The
HttpExecutionStrategies.defaultStrategy()
strategy currentlyprovides a special
merge()
implementation that, rather than merge,simply returns the other strategy. This behavior is often surprising
and requires specific handling elsewhere to ensure that the strategy
has consistent merging when referenced reflexively.
Modifications:
Replace use of
HttpExecutionStrategies.defaultStrategy().merge()
withexplicit substitution of
defaultStrategy()
with the appropriatestrategy.
Result:
Reduced special behavior in the
HttpExecutionStrategy
implementationwhich clarifies the actual interaction and behavior of strategies.