OkHttp gRPC sender retries are rejected by a bounded executor
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 61/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Java
- Stelle
- 2.5k
- Fork
- 1k
- Merge medio
- 2g 23h
- PR unite (30g)
- 68
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di open-telemetry/opentelemetry-java
-
OkHttpGrpcSender no longer logs retry attemptsForse già presa @thswlsqls l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
open-telemetry/opentelemetry-java#8966 · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
JdkHttpSender passes CompletionException instead of the original exception to onErrorForse già presa @thswlsqls l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
open-telemetry/opentelemetry-java#8961 · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Fix `otel.sdk.log.created` counting semanticsForse già presa @anuraaga l’ha presa 75 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
open-telemetry/opentelemetry-java#8688 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
open-telemetry/opentelemetry-java#8971 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
open-telemetry/opentelemetry-java#8970 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di open-telemetry/opentelemetry-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
account bug communication lecture
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area/server bug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
modelcontextprotocol/java-sdk#1196 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Consumer progress rows interleave topics with equal queue IDsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/rocketmq-dashboard#7250 ·
I maintainer di solito rispondono entro 3 giorni