Giter VIP home page Giter VIP logo

Comments (3)

davyxu avatar davyxu commented on May 4, 2024

hash本身会冲撞,冲撞的时候有两种解决方法:
1.加盐(salt) : 在名字加前缀或者后缀再进行hash
2. 直接修改消息名,避免冲突

cellnet不生成消息id,所以加盐这个可以自己处理

from cellnet.

muqian3288 avatar muqian3288 commented on May 4, 2024

感谢davyxu的回答。我已经用了合适的方法(文件index,message index,生成msgid),修正了我的项目。

这段代码,我确认是cellnet下的。
protoc-gen-msg,会自动生成msgid.
file.go 下有这段代码
func (self *msgModel) MsgID() int {
return int(util.StringHash(self.FullName()))
}
会导致MsgID 的相同的隐患。

期望能有标注,或者修掉这个隐患。

from cellnet.

davyxu avatar davyxu commented on May 4, 2024

这个隐患无法消除,hash本身机制已经决定了,这不是cellnet修复下就能搞定的。

from cellnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.