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

Start()后广播的时机 #19

Closed
Vector6662 opened this issue Jun 13, 2022 · 2 comments
Closed

Start()后广播的时机 #19

Vector6662 opened this issue Jun 13, 2022 · 2 comments

Comments

@Vector6662
Copy link

请问您的实现中,当raft被调用Start()后,将这条entry同步的时机时什么时候呢?是立即广播还是等到下一次心跳呢?
我目前遇到的问题是在Lab 3A的TestSpeed3A,会超时,我改成了每次都立即广播,虽然效果很好但发送的rpc太多。
我觉得应该是和我设置的心跳超时时间有关系,如果设置得很短比如15ms,就不会出现这个问题

@OneSizeFitsQuorum
Copy link
Owner

下一次心跳或者同步线程刚好执行完开始下一轮吧,最长的延时应该是一轮心跳的时间

@Vector6662
Copy link
Author

get,谢谢!

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