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

オープン
#1,654 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 8 日以内に返信

@dodjdnh がすでに取り組んでいます。

2026年11月26日 から。

  • #1655 @dodjdnh による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
go

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Go
スター
4.1k
フォーク
2.2k
平均マージ
6日 2時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/dubbo-admin のほかの issue

apache/dubbo-admin の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。