You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "yangpixi (via GitHub)" <gi...@apache.org> on 2026/02/23 11:40:14 UTC

[I] [BUG] dubbo计算revision的时候参与计算的参数过少,导致无法正确区分不同服务 [dubbo-go]

yangpixi opened a new issue, #3223:
URL: https://github.com/apache/dubbo-go/issues/3223

   ### ✅ 验证清单
   
   - [x] 🔍 我已经搜索过 [现有 Issues](https://github.com/apache/dubbo-go/issues),确信这不是重复问题
   
   ### 🚀 Go 版本
   
   1.24.0
   
   ### 📦 Dubbo-go 版本
   
   v3.3.2
   
   ### 🖥️ 服务端配置
   
   dubbo-go, v3.3.2
   
   ### 💻 客户端配置
   
   dubbo-go, v3.3.2
   
   ### 🌐 协议配置
   
   Triple
   
   ### 📋 注册中心配置
   
   Nacos v2.4.3
   
   ### 💾 操作系统
   
   🍎 macOS
   
   ### 📝 Bug 描述
   
   目前revision计算代码:
   ```
   func resolveRevision(urls []*common.URL) string {
   	if len(urls) == 0 {
   		return "0"
   	}
   	candidates := make([]string, 0, len(urls))
   
   	for _, u := range urls {
   		sk := u.GetParam(constant.InterfaceKey, "")
   
   		if len(u.Methods) == 0 {
   			candidates = append(candidates, sk)
   		} else {
   			for _, m := range u.Methods {
   				// methods are part of candidates
   				candidates = append(candidates, sk+constant.KeySeparator+m)
   			}
   		}
   
   		// append url params if we need it
   	}
   	sort.Strings(candidates)
   
   	// it's nearly impossible to be overflow
   	res := uint64(0)
   	for _, c := range candidates {
   		res += uint64(crc32.ChecksumIEEE([]byte(c)))
   	}
   	return fmt.Sprint(res)
   }
   ```
   该代码仅会计算方法名称,忽略了version等的计算,导致开启两个不同版本的示例会导致冲突。
   该方法注释上说dubbo-java忽略了params,实际并未忽略。
   
   ### 🔄 重现步骤
   
   为两个provider的方法设置不同版本,会产生覆盖。
   
   ### ✅ 预期行为
   
   不同版本的方法应该正确隔离。
   
   ### ❌ 实际行为
   
   当两个provider提供的方法版本不一致的时候,会导致冲突。
   
   ### 💡 可能的解决方案
   
   计算revision的时候参考dubbo-java的代码


-- 
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] dubbo计算revision的时候参与计算的参数过少,导致无法正确区分不同服务 [dubbo-go]

Posted by "yangpixi (via GitHub)" <gi...@apache.org>.
yangpixi commented on issue #3223:
URL: https://github.com/apache/dubbo-go/issues/3223#issuecomment-3944269016

   related to #3214 


-- 
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] dubbo计算revision的时候参与计算的参数过少,导致无法正确区分不同服务 [dubbo-go]

Posted by "yangpixi (via GitHub)" <gi...@apache.org>.
yangpixi closed issue #3223: [BUG] dubbo计算revision的时候参与计算的参数过少,导致无法正确区分不同服务
URL: https://github.com/apache/dubbo-go/issues/3223


-- 
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