CancelProofEnvoyStream#2250
Merged
carloseltuerto merged 3 commits intoenvoyproxy:mainfrom May 5, 2022
Merged
Conversation
Signed-off-by: Charles Le Borgne <cleborgne@google.com>
Signed-off-by: Charles Le Borgne <cleborgne@google.com>
RyanTheOptimist
previously approved these changes
May 5, 2022
Contributor
RyanTheOptimist
left a comment
There was a problem hiding this comment.
Looks great. Two tiny comments.
| assertThat(mCancelInvocationCount.get()).isOne(); | ||
| } | ||
|
|
||
| private class MockedStream extends EnvoyHTTPStream { |
Contributor
There was a problem hiding this comment.
Can you add a comment which explains the various Block/Latch behaviors of this class?
Contributor
Author
There was a problem hiding this comment.
Added a comment. Short story: a ConditionVariable is in reality a CountDownLatch where the initial count is "1".
| // Does nothing because the "Concurrently Running Stream Operations Count" starts with "1". | ||
| // This is the desired outcome - the cancel is postponed. Once the stream is set, the next | ||
| // Stream Operation will invoke "cancel". | ||
| cancelProofEnvoyStream.cancel(); |
Contributor
There was a problem hiding this comment.
Should this check that the cancel invocation count is 0?
Contributor
Author
There was a problem hiding this comment.
It is the MockedStream that can increment the cancel invocation count, and this test does not invoke setStream: it is pointless to verify it.
Added a comment.
Signed-off-by: Charles Le Borgne <cleborgne@google.com>
RyanTheOptimist
approved these changes
May 5, 2022
jpsim
added a commit
that referenced
this pull request
May 6, 2022
…on-6.0.0-pre.20220421.3 * origin/main: Upgrade rules_jvm_external from 4.1 -> 4.2 (#2254) CancelProofEnvoyStream (#2250) swift: add DrString tool & fix documentation comment issues (#2233) Fix `bump_lyft_support_rotation.sh` posting to Slack (#2234) jni: fix mismatched return value types (#2252) Remove bintray as a maven source (#2248) test: refine connection drain test (#2245) cleanup: remove comment in Http::Client that no longer applies (#2203) cleanup: fix test with inaccurate description (#2202) network: perform post-DNS connection drain on a per-host basis (#2240) Signed-off-by: JP Simard <jp@jpsim.com>
jpsim
added a commit
that referenced
this pull request
May 6, 2022
* main: envoy: update to efbbb04 (#2258) Update rules_java, rules_detekt, rules_jvm_external (#2249) Upgrade rules_jvm_external from 4.1 -> 4.2 (#2254) CancelProofEnvoyStream (#2250) swift: add DrString tool & fix documentation comment issues (#2233) Fix `bump_lyft_support_rotation.sh` posting to Slack (#2234) jni: fix mismatched return value types (#2252) Remove bintray as a maven source (#2248) test: refine connection drain test (#2245) cleanup: remove comment in Http::Client that no longer applies (#2203) cleanup: fix test with inaccurate description (#2202) network: perform post-DNS connection drain on a per-host basis (#2240) network: add enableDrainPostDnsRefresh to iOS (#2242) envoy: update to em-cherry (#2241) network: support draining connections after triggered DNS refresh (#2225) Signed-off-by: JP Simard <jp@jpsim.com>
This file contains hidden or 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
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.
Description: Wrapper for the EnvoyStream guaranteeing that a another stream method can't be called after a "cancel"
Risk Level: None - Cronvoy only
Testing: CI
Docs Changes: N/A
Release Notes: N/A
Signed-off-by: Charles Le Borgne cleborgne@google.com