Skip to content

Commit

Permalink
fix mod strategy overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
c7ch23en committed Nov 26, 2019
1 parent 9e163b7 commit 5e5bb94
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public Set<String> getAllTableShards(String tableName) {

protected int getModResult(int mod, Object shardValue) {
long longValue = getLongValue(shardValue);
return (int) longValue % mod;
return (int) (longValue % mod);
}

protected Long getLongValue(Object value) {
Expand Down

0 comments on commit 5e5bb94

Please sign in to comment.