Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
We have seen exceptions from workers
java.lang.IllegalArgumentException: bound must be positive
The stack trace points to LoadAwareShuffleGrouping.java#L234:
//in case we didn't fill in enough for (; currentIdx < CAPACITY; currentIdx++) { prepareChoices[currentIdx] = prepareChoices[random.nextInt(currentIdx)]; }
This is because in some situation,
int count = (int) ((indexAndWeights.weight / (double) weightSum) * CAPACITY);
the above code will be 0 during the whole for-loop. For example, when there are more than 1000 (which is CAPACITY) downstream tasks, say 1001, and each task has weight 1. Then for every target task, count =(int) ( (1 / 1001.0) * 1000) = 0.
Attachments
Issue Links
- links to