You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Hash" class in rule.xml is redirected to com.actiontech.dble.route.function.PartitionByLong, which uses com.actiontech.dble.route.util.PartitionUtil for routing.
With comments inside, it seems that PartitionUtil wants to limit its sharding space into a [0,1024] interger space.
It will do check when it is initializing:
get the dot product of partitionCount array and partitionLength array
partitionLength = ai[ai.length - 1];
/* other statments */if (partitionLength > MAX_PARTITION_LENGTH) {
thrownewRuntimeException("error,check your partitionScope definition.MAX(sum(count*length[i]) must be less then 1024 ");
}
But, the limit here is not 1024, but 2880. So, a setting like partitionCount[] = {1} ; paritiontLength[] = {2880} is runnable. Though the case is against the design.
privatestaticfinalintMAX_PARTITION_LENGTH = 2880;
How to Repeat
Start your dble, which has "Hash" tables, with settings belows, you will find dble works. Though this is against its design goal.
Phenonmenon
"Hash" class in rule.xml is redirected to
com.actiontech.dble.route.function.PartitionByLong
, which usescom.actiontech.dble.route.util.PartitionUtil
for routing.With comments inside, it seems that
PartitionUtil
wants to limit its sharding space into a [0,1024] interger space.It will do check when it is initializing:
partitionCount
array andpartitionLength
arrayBut, the limit here is not 1024, but 2880. So, a setting like
partitionCount[] = {1} ; paritiontLength[] = {2880}
is runnable. Though the case is against the design.How to Repeat
Start your dble, which has "Hash" tables, with settings belows, you will find dble works. Though this is against its design goal.
Fix Suggestion
Change the value of MAX_PARTITION_LENGTH in
PartitionUtil
with 1024.The text was updated successfully, but these errors were encountered: