mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-18 21:26:35 +00:00
Merge pull request #109 from HaoZiMc/main
fix[net]: TaskBus计算hash的时候,在taskExecutorHash达到int最大值的时候,计算出来是负数
This commit is contained in:
@@ -95,7 +95,7 @@ public final class TaskBus {
|
||||
|
||||
private static int calTaskExecutorIndex(int taskExecutorHash) {
|
||||
// Other hash algorithms can be customized to make the distribution more uniform
|
||||
return Math.abs(taskExecutorHash) % EXECUTOR_SIZE;
|
||||
return Math.abs(taskExecutorHash % EXECUTOR_SIZE);
|
||||
}
|
||||
|
||||
public static int calTaskExecutorHash(Object argument) {
|
||||
|
||||
Reference in New Issue
Block a user