You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "AlexStocks (via GitHub)" <gi...@apache.org> on 2026/07/30 03:01:15 UTC
[I] [Improve] zookeeper metadata ListAppRevisions does one Get per revision (N+1 round-trips) [dubbo-go]
AlexStocks opened a new issue, #3571:
URL: https://github.com/apache/dubbo-go/issues/3571
## 问题描述
`metadata/report/zookeeper/report.go` 的 `ListAppRevisions`(L138–160)先 `Children(parent)` 列出 revision 子节点,再 **for 循环对每个 revision 单独 `m.client.Get(path)`**(L150):
```go
children, _, err := m.client.Children(parent)
...
for _, rev := range children {
path := parent + constant.PathSeparator + rev
data, _, err := m.client.Get(path) // 每个 revision 一次往返
...
}
```
etcd 的等价实现(`metadata/report/etcd/report.go` 的 `GetChildren` / 前缀批量读)是一次前缀批量获取;ZK 这边没有使用 multi-op 或批量接口。
## 影响
当某个 app 的 revision 数量较多时,ZK 往返次数随 revision 数线性增长,列举延迟升高。
## 建议修复
- 评估是否可使用 ZK multi-op 合并列举,或在一次调用内获取子节点数据(参考 etcd 实现);
- 至少明确该路径为已知 N+1,避免在高频列举场景调用。
## 参考
- `metadata/report/zookeeper/report.go` L138–159
- etcd 对照实现:`metadata/report/etcd/report.go`
--
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] [Improve] zookeeper metadata ListAppRevisions does one Get per revision (N+1 round-trips) [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks closed issue #3571: [Improve] zookeeper metadata ListAppRevisions does one Get per revision (N+1 round-trips)
URL: https://github.com/apache/dubbo-go/issues/3571
--
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] [Improve] zookeeper metadata ListAppRevisions does one Get per revision (N+1 round-trips) [dubbo-go]
Posted by "xiaobaicai66695 (via GitHub)" <gi...@apache.org>.
xiaobaicai66695 commented on issue #3571:
URL: https://github.com/apache/dubbo-go/issues/3571#issuecomment-5192384574
ask for assign
--
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