Running off 0.20-security, I noticed that one could get the following exception when scanners are used:
This is cause the period, determined in the DataBlockScanner (0.20+) or BlockPoolSliceScanner (0.23+), is cast to an integer before its sent to a Random.nextInt(...) call. For sufficiently large values of the long 'period', the casted integer may be negative. This is not accounted for. I'll attach a sample test that shows this possibility with the numbers.
We should ensure we do a Math.abs(...) before we send it to the Random.nextInt(...) call to avoid this.
With this bug, the maximum # of blocks a scanner may hold in its blocksMap without opening up the chance for beginning this exception (intermittent, as blocks continue to grow) would be 3582718.
|Status||Patch Available [ 10002 ]||Open [ 1 ]|
|Status||Patch Available [ 10002 ]||Resolved [ 5 ]|
|Hadoop Flags||Reviewed [ 10343 ]|
|Fix Version/s||0.20.206.0 [ 12317959 ]|
|Fix Version/s||0.23.1 [ 12318885 ]|
|Fix Version/s||0.24.0 [ 12317653 ]|
|Resolution||Fixed [ 1 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|