Skip to content
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

core: backport RetriableStream bug fix (backport v1.40.x) #8387

Merged
merged 2 commits into from Aug 9, 2021

Commits on Aug 6, 2021

  1. core: fix bug RetriableStream cancel() racing with start() (grpc#8386)

    There is a bug in the scenario of the following sequence of events:
    
    - `call.start()` 
    - received retryable status and about to retry
    - The retry attempt Substream is created but not yet `drain()` 
    - `call.cancel()`
    
    But `stream.cancel()` cannot be called prior to `stream.start()`, otherwise retry will cause a failure with IllegalStateException. The current RetriableStream code must be fixed to not cancel a stream until `start()` is called in `drain()`.
    dapengzhang0 committed Aug 6, 2021
    Copy the full SHA
    551d51e View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2021

  1. core: fix RetriableStream edge case bug introduced in grpc#8386 (grpc…

    …#8393)
    
    While adding regression tests to grpc#8386, I found a bug in an edge case: while retry attempt is draining the last buffered entry, if it is in the mean time committed and then we cancel the call, the stream will never be cancelled. See the regression test case `commitAndCancelWhileDraining()`.
    dapengzhang0 committed Aug 7, 2021
    Copy the full SHA
    db2900a View commit details
    Browse the repository at this point in the history