Affects Version/s: None
Fix Version/s: 1.6.1
Problem : Multi-thread pruning fails when datamaps count is just near numOfThreadsForPruning.
Cause : When the datamaps count is just near numOfThreadsForPruning,
As code is checking '>= ', last thread may not get the datamaps for prune. Hence array out of index exception is thrown in this scenario.
There is no issues with higher number of datamaps.
solution: In this scenario launch threads based on the distribution value, not on the hardcoded value
steps to reproduce:
5 index files with total 0.32 million data file (each has 50k, 120k, 50k, 60k, 50k each)
with default thread count as 4, array of bound index is observed for below line.
final List<SegmentDataMapGroup> segmentDataMapGroups = datamapListForEachThread.get;