refactor: add more params when calculating the revision.#3224
refactor: add more params when calculating the revision.#3224yangpixi wants to merge 4 commits intoapache:developfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3224 +/- ##
===========================================
+ Coverage 46.76% 47.88% +1.11%
===========================================
Files 295 463 +168
Lines 17172 33730 +16558
===========================================
+ Hits 8031 16151 +8120
- Misses 8287 16273 +7986
- Partials 854 1306 +452 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Alanxtl
left a comment
There was a problem hiding this comment.
把java对应计算方式的源码地址贴到注释里面,并且在评论区里也发一份我们对照着review一下
ok |
Alanxtl
left a comment
There was a problem hiding this comment.
把这两个相同的代码段抽成一个公共的方法放在metadata/info/metadata_info.go或者其他合适的地方吧,然后补写一下新方法的单元测试
|
另外constant.InterfaceKey这个字段需不需要加入到计算的过程中呀 |
u.Path获取的value和interface是一样的,应该不需要考虑了 |
|
考虑了一下,没有必要再计算一次revision,直接将已经计算出来的revision赋值给metaInfo这个变量就行 |



Description
Fixes #3223
目前revision计算机制考虑的参数过少,导致不同服务可能会计算出相同的revision,进而导致冲突
java部分计算代码:
该代码将字符串拼接起来后再计算md5,golang不方便拼接所有params,所以选取了几个特征参数计算
Checklist
develop