[Bug] Generic invoke does not propagate timeoutMs to Dubbo client, causing per-request timeout to fall back to 3s

Đang mở
#1,654 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 8 ngày

@dodjdnh đang làm issue này rồi.

Từ ngày 26/11/2026.

  • #1655 của @dodjdnh — đang mở

Đá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
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go

Hướng nghiên cứu

Start with pkg/console/service/service_generic_invoke.go, especially invokeGenericServiceRPC and the context.WithTimeout setup described in the issue. Trace how request timeout options reach the Dubbo client and check how the Reference URL gets its timeout; the issue links Dubbo client timeout options and related issues #1633 and #1652. Done means requests below and above the 3s default use the supplied timeoutMs; an open pull request #1655 is already linked.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

在泛化调用(POST /api/v1/service/generic/invoke)中,请求参数 timeoutMs 对 Dubbo 协议不生效。

pkg/console/service/service_generic_invoke.go(L233)虽然通过 context.WithTimeout 为 callCtx 设置了超时,但在 invokeGenericServiceRPC(L67-L104)创建 cli.NewGenericService(...) 时未将 req.TimeoutMs 通过 client.WithRequestTimeout / client.WithClientRequestTimeout 传入 dubbo-go Client。由于 Dubbo 协议的 DubboInvoker.getTimeout 依赖 Reference URL 上的 timeout 参数而非 callCtx.Deadline(),实际请求 URL 始终使用默认值 timeout=3s。

Expected Behavior
  • Actual:在 Dubbo 协议泛化调用中,对耗时 1000ms 的 Provider 方法传入 timeoutMs=100 时,调用未在 100ms 超时而是成功返回(反之传入大于 3000ms 的超时会在 3s 被提前中断)。
  • Expected:timeoutMs 应正确透传至底层 Dubbo Client / Reference 配置,使小于和大于默认 3s 的单次调用超时均按请求值生效。
Minimal Reproduction
  1. 启动暴露 Dubbo 协议延迟方法(如 delay(1000) 耗时 1000ms)的 Provider。
  2. 通过 InvokeServiceGeneric 或 POST /api/v1/service/generic/invoke 调用该方法并设置 timeoutMs: 100。
  3. 观察 Refer 日志可见 URL 中仍为 timeout=3s,且本次调用未超时并成功返回。
Related Issues
  • Related to #1633
  • Related to #1652
  • Related to apache/dubbo-go#3792
Ngôn ngữ chính
Go
Star
4.1k
Fork
2.2k
Merge trung bình
6 ngày 2 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/dubbo-admin

Tất cả issue của apache/dubbo-admin

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.