ClientCall.isReady() is true after ClientCall.halfClose()
- 主要言語
- Java
- スター
- 12.1k
- フォーク
- 4k
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 37
説明
I have code like this for a client streaming call:
```java
ClientCall call = ...;
ClientCall.Listener listener = new ClientCall.Listener() {
@Override
public void onReady() {
while(call.isReady()) {
if (allDataSent()) {
call.halfClose();
return;
}
sendMessage();
}
}
}
call.start(listener, metadata);
call.request(1);
```
I found `call.halfClose()` to be called more than once (and thus crash). I would have expected `call.isReady()` to be `false` after `call.halfClose()` was called since after half-closing, we certainly can't send any new messages.
Thoughts?
P.S: I am using this API, cause I need flow control and the `CallStreamObserver` is marked experimental.
コントリビューションガイド
調査の方向性
ClientCall.isReady() と halfClose() のエントリポイントから始め、レポートに示されている client-streaming のコールバックシーケンスを追跡します。halfClose() が繰り返されるケースを再現し、その後、既存のテストを調査するか、halfClose() 後の readiness の挙動を記録して確定した契約を検証する回帰テストを追加します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- grpc, java
- 領域
- api, backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100