Merge pull request #109 from HaoZiMc/main

fix[net]: TaskBus计算hash的时候,在taskExecutorHash达到int最大值的时候,计算出来是负数
This commit is contained in:
godotg
2024-06-05 16:51:04 +08:00
committed by GitHub
@@ -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) {