You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Aetherance (via GitHub)" <gi...@apache.org> on 2026/02/06 22:07:44 UTC
[I] [BUG] TagRouter is bypassed when using v3 NewInstance API and Triple protocol [dubbo-go]
Aetherance opened a new issue, #3199:
URL: https://github.com/apache/dubbo-go/issues/3199
### ✅ 验证清单
- [x] 🔍 我已经搜索过 [现有 Issues](https://github.com/apache/dubbo-go/issues),确信这不是重复问题
### 🚀 Go 版本
1.25.5
### 📦 Dubbo-go 版本
v3.3.1
### 🖥️ 服务端配置
_No response_
### 💻 客户端配置
_No response_
### 🌐 协议配置
triple
### 📋 注册中心配置
zookeeper v3.9.0
### 💾 操作系统
🐧 Linux
### 📝 Bug 描述
在 dubbo-go v3 NewInstance API 模式下,TagRouter 失效。即便设置了 force.tag=true,请求仍会绕过路由逻辑发送到不匹配的实例。
### 🔄 重现步骤
server:
```go
func main() {
ins, _ := dubbo.NewInstance(
dubbo.WithName("reproduce-server"),
dubbo.WithRegistry(registry.WithZookeeper(), registry.WithAddress("127.0.0.1:2181")),
)
srv, _ := ins.NewServer(server.WithServerProtocol(protocol.WithTriple(), protocol.WithPort(20001)))
greet.RegisterGreetServiceHandler(srv, &GreetServiceHandler{})
srv.Serve()
}
```
client:
```go
func main() {
ins, _ := dubbo.NewInstance(
dubbo.WithRegistry(registry.WithZookeeper(), registry.WithAddress("127.0.0.1:2181")),
)
cli, _ := ins.NewClient()
svc, _ := greet.NewGreetService(cli)
time.Sleep(10 * time.Second) // wait for discovery
ctx := context.WithValue(context.Background(), constant.AttachmentKey, map[string]string{
"dubbo.tag": "not-exist-tag",
"dubbo.force.tag": "true",
})
resp, err := svc.Greet(ctx, &greet.GreetRequest{Name: "Dubbo"})
fmt.Printf("Response: %v\nError: %v\n", resp, err)
}
```
### ✅ 预期行为
在设置 `"dubbo.force.tag": "true"` 时,dubbo-go 应该遵守路由规则。如果没有能够满足路由规则的节点,rpc 调用应该返回 error No provider available for the service。Response 应为 nil,且本次 rpc 调用失败
### ❌ 实际行为
实际输出:
```
Requesting with tag: not-exist-tag, force: true
Response: greeting:"Hello Dubbo, (Port: 20001, StaticTag: no-tag)"
Error: <nil>
```
### 💡 可能的解决方案
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [BUG] TagRouter is bypassed when using v3 NewInstance API and Triple protocol [dubbo-go]
Posted by "Aetherance (via GitHub)" <gi...@apache.org>.
Aetherance commented on issue #3199:
URL: https://github.com/apache/dubbo-go/issues/3199#issuecomment-3862777974
pr #3185 did not fix this bug
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [BUG] TagRouter is bypassed when using v3 NewInstance API and Triple protocol [dubbo-go]
Posted by "yangpixi (via GitHub)" <gi...@apache.org>.
yangpixi commented on issue #3199:
URL: https://github.com/apache/dubbo-go/issues/3199#issuecomment-3863743257
我这边测试pr #3185 已经修复这个bug
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [BUG] TagRouter is bypassed when using v3 NewInstance API and Triple protocol [dubbo-go]
Posted by "Aetherance (via GitHub)" <gi...@apache.org>.
Aetherance closed issue #3199: [BUG] TagRouter is bypassed when using v3 NewInstance API and Triple protocol
URL: https://github.com/apache/dubbo-go/issues/3199
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org