OkHttp gRPC sender retries are rejected by a bounded executor
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
Start with OkHttpGrpcSender.sendAttempt() and the retry path described in the issue; compare how OkHttpHttpSender and JdkHttpSender handle retries. Reproduce with the bounded executor and a closed localhost port. Done when an enabled retry reaches the network after backoff and the export reports the expected ConnectException.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Since #8854, OkHttpGrpcSender starts each retry by calling Call.enqueue() from inside the OkHttp callback of the failed attempt. That dispatcher thread is still busy, so with a bounded executor every retry is rejected and the export fails with InterruptedIOException: executor rejected instead of being retried.
Steps to reproduce
- Build an OTLP gRPC exporter with retry enabled (the default) and
setExecutorService(new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS, new SynchronousQueue<>())). - Point it at a closed localhost port.
- Export once.
What did you expect to see?
A retry after backoff, then the ConnectException. Before #8854, RetryInterceptor retried on the same thread, as OkHttpHttpSender and JdkHttpSender still do.
What did you see instead?
The retry fails with java.io.InterruptedIOException: executor rejected in OkHttpGrpcSender.sendAttempt() → enqueue() and never reaches the network.
What version and what artifacts are you using?
Artifacts: opentelemetry-exporter-otlp, opentelemetry-exporter-sender-okhttp
Version: 1.67.0 / main @ b32298a83
How did you reference these artifacts? Gradle
Environment
Compiler: Temurin 21
OS: N/A
Additional context
I have a small fix that runs retries synchronously on the current thread. Happy to adjust if maintainers prefer a different execution model (e.g. a JdkHttpSender-style loop).
- 主要言語
- Java
- スター
- 2.5k
- フォーク
- 1k
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 68
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
open-telemetry/opentelemetry-java のほかの issue
-
OkHttpGrpcSender no longer logs retry attempts対応中かも @thswlsqls が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
open-telemetry/opentelemetry-java#8966 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
JdkHttpSender passes CompletionException instead of the original exception to onError対応中かも @thswlsqls が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
open-telemetry/opentelemetry-java#8961 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Fix `otel.sdk.log.created` counting semantics対応中かも @anuraaga が 75 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
open-telemetry/opentelemetry-java#8688 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
open-telemetry/opentelemetry-java#8971 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
open-telemetry/opentelemetry-java#8970 ·
メンテナーはふだん 2 日以内に返信
open-telemetry/opentelemetry-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QuiltMC/update-quilt-meta#28 ·
-
awaiting triage Documentation P3
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
area/build area/maintainability component/camunda-process-test kind/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToList対応中かも @mohamed-elbrik が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area/kotlin
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信