Skip to content

Commit

Permalink
core: always propagate RetriableStream.Sublistener.onReady()
Browse files Browse the repository at this point in the history
This fixes #6817 for the normal retry case, although it makes the hedging issue #7089 more broken, and there is still space of optimization for normal retry.
  • Loading branch information
dapengzhang0 committed Jun 4, 2020
1 parent 2740901 commit 959769a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/main/java/io/grpc/internal/RetriableStream.java
Expand Up @@ -947,10 +947,10 @@ public void messagesAvailable(MessageProducer producer) {

@Override
public void onReady() {
// TODO(zdapeng): the more correct way to handle onReady
if (state.drainedSubstreams.contains(substream)) {
masterListener.onReady();
}
// FIXME(#7089): hedging case is broken.
// TODO(zdapeng): optimization: if the substream is not drained yet, delay onReady() once
// drained and if is still ready.
masterListener.onReady();
}
}

Expand Down

0 comments on commit 959769a

Please sign in to comment.