Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

func_id碰撞问题 #113

Open
laser-pen opened this issue Nov 22, 2023 · 1 comment
Open

func_id碰撞问题 #113

laser-pen opened this issue Nov 22, 2023 · 1 comment

Comments

@laser-pen
Copy link

代码中的func_id是通过计算字符串的md5得到的,能保证不发生碰撞吗?

@qicosmos
Copy link
Owner

这里应该稍微完善一下,当注册的时候发现md5冲突了应该直接报错(晚点加这个逻辑),现在是后面的不会覆盖前面的。
另外md5冲突的概率非常低,一个server 有一百个rpc服务就非常多了,相比uint32而言,冲突的概率为千万分之一,几乎不会发生冲突。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants