OkHttp gRPC sender retries are rejected by a bounded executor
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 61/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Java
- Star
- 2.5k
- Fork
- 1k
- Merge trung bình
- 2 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 68
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của open-telemetry/opentelemetry-java
-
OkHttpGrpcSender no longer logs retry attemptsCó thể đã có người làm @thswlsqls đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
open-telemetry/opentelemetry-java#8966 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
JdkHttpSender passes CompletionException instead of the original exception to onErrorCó thể đã có người làm @thswlsqls đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-telemetry/opentelemetry-java#8961 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Fix `otel.sdk.log.created` counting semanticsCó thể đã có người làm @anuraaga đã nhận 76 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-telemetry/opentelemetry-java#8688 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
open-telemetry/opentelemetry-java#8972 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
open-telemetry/opentelemetry-java#8970 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của open-telemetry/opentelemetry-java
Issue tương tự
-
bug/错误
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
FCL-Team/FoldCraftLauncher#1951 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
quarkusio/quarkus-agent-mcp#296 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
commons-app/apps-android-commons#7072 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement web-ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
jenkinsci/jenkins#27583 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100