Replies: 1 comment
-
It look like its for improve system stability. The first judgement is 2 * heartBeatTimeIntervalMs It give a chance to current term's leader that it can send a heartbeat to follower to prevent it upgrade to candidate, when we found it will be timeout. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
源代码:
为什么需要进行两次超时判断,而不是直接将最终的超时判断放到锁外,就像下面这样:
是考虑性能还是什么其他原因
Beta Was this translation helpful? Give feedback.
All reactions