Closed
@bjxutj

Description

What version of gRPC-Java are you using?

I am using 1.26.0, and I have tried 1.27.2 and latest code 1.27.3 (compiled by myself).

What is your environment?

Windows 10, with openjdk 11.0.2

What did you expect to see?

I expect to see the onReady is called, then trigger masterListener.onReady().

What did you see instead?

onReady is called, but masterListener.onReady() is not called.

Steps to reproduce the bug

Sorry, it is hard to reproduce, but I can analyze the code to explain.
In drain(Substream) of RetriableStream, the new state was generated when all the entries were runWith the substream. but in the start(), a StartEntry was added, then the stream started after runWith. There is a possibility that the stream has sent the data successfully and call onReady to notify (another thread), but the new state which include the substream in the drainedSubstreams was not generated, then masterListener.onReady() was not called.