stateIs0 / lu-raft-kv

this is raft java project. raft-kv-storage
https://thinkinjava.cn/2019/01/12/2019/2019-01-12-lu-raft-kv/
Apache License 2.0
806 stars 216 forks source link

判断是否是多数派少了+1 #9

Closed smmdwa closed 3 years ago

smmdwa commented 3 years ago

// 响应客户端(成功一半) if (success.get() >= (count / 2)) {

应该是:count / 2+1 地址:https://github.com/stateIs0/lu-raft-kv/blob/master/lu-raft-kv/src/main/java/cn/think/in/java/impl/DefaultNode.java#L323

smmdwa commented 3 years ago

理解错了,抱歉,代码没有问题