redlock-php icon indicating copy to clipboard operation
redlock-php copied to clipboard

fix: lock inttval(N/2)+1 instead fo N/2+1

Open chenlipeng opened this issue 8 years ago • 0 comments

hello: I found that the calculation of the majority is not strict. In php we should use intval(N/2)+1 instead of N/2+1, because if we have three masters the we must achieve the majority of the instances (at least 3), in fact we only need achieve the majority of the instances (at least 2).

chenlipeng avatar Dec 13 '17 03:12 chenlipeng